[wp-hackers] how to integrate plugins into theme easily

Stephen Rider wp-hackers at striderweb.com
Fri Jun 5 12:46:15 GMT 2009


On Jun 5, 2009, at 7:38 AM, Chris Scott wrote:

> On Fri, Jun 5, 2009 at 8:00 AM, Mayur Somani<somani.mayur at gmail.com>  
> wrote:
>> How can I integrate any plugin into the theme itself so that I  
>> don't have to
>> ask the end user to install it.
>> Thanks.
>
> You can do something like this:
>
> - Create a "plugins" directory in your theme directory.
> - Copy the plugins to that directory.
> - In your theme's functions.php do a require_once() for each plugin's
> main file you want to enable.
>
> Note that if you do this, users won't be able to disable the plugins
> in the Plugins admin panel--they won't see them at all there.

Ah -- I misunderstood the question I think.

Chris's method works, except that some plugins only really work if  
located in the plugins directory.  So if you're talking about your own  
plugins, no problem.  If you're talking about third party plugins, it  
will require testing.

(Especially plugins that require a URL to plugin files, e.g. they link  
a CSS file....)

Stephen


-- 
Stephen Rider
http://striderweb.com/






More information about the wp-hackers mailing list