The MU forums have moved to

include function or plugin in theme (2 posts)

  1. demonicume
    Posted 16 years ago #

    i've been looking into ways to personalize my users' experiences. i've given some of them limited FTP access to their theme directory - as created by the userthemes plugin. the aforementioned plugin adds to the experience, and it also increased my inbox! some themes have included plugins. the issue is that these plugins aren't appropriate for all users. i've been using looked into luna's hack for a main site only plugins - and it works great except that i always forget to back it up before upgrades :-). i've looked into using Nolageek's version of Luna's hack.

    but while customizing a theme for a user, i noticed a plugin in the theme directory. looking further, I see that the author used: '<?php include (TEMPLATEPATH . '/simple_recent_comments.php'); ?>' to include the plugin/function in the theme.

    what are the limits of this functionality? a lot of standard wordpress themes come with built in plugin options, but i often don't want to use these plugins sitewide. i also dont feel like loading them and then disabling them on a per blog basis. so could i use this with themes tat require specific plugins? and, if i did, what are the security risks?

  2. andrea_r
    Posted 16 years ago #

    I dunno about the security risks, but yeah, that's the way plugins are included without being activated (so to speak).

    I mean, you can paste the plugin code in the functions file and it'll work....

About this Topic

  • Started 16 years ago by demonicume
  • Latest reply from andrea_r