My Theme defines its own actions and filters so that it can be extended by third-parties without having to fork or modify the Theme's core code.
I already have a few plugins specific to my Theme, that I'm installing in the usual way in wp-content/plugins
and activating through the Admin panel.
However, for ease of use, I would like to bundle a few plugins directly into my Theme itself, for example in my_theme/plugins
, without having to require the user to move the plugins he wants to install to the WordPress plugin directory (thus breaking the Theme's update capabilities, etc.).
Have you seen any Theme or Plugin that does that in an elegant way? What are best practices to doing that?
In particular, a few questions come to mind if I were to implement such a system:
- Is there a way to easily configure a custom plugin directory into WordPress, in addition to
wp-content/plugins
? - If I were to simply implement my own naive plugin activation system, what steps should I take? Do I just need to set up a basic admin panel listing, store a list of activated "custom plugins" and just include the corresponding PHP files on Theme init?
Thanks for your help!
EDIT: Related to, but different from, Are drop-in plugins a product of design and Add Plugins to Wordpress Theme: in the present case, plugins don't make sense without the Theme (they extend it) and they're written by the same person/company.