[wp-hackers] Activating another Plugin when Activating a Plugin

scribu mail at scribu.net
Fri Dec 10 17:28:56 UTC 2010


On Fri, Dec 10, 2010 at 7:02 PM, Scott Kingsley Clark <scott at skcdev.com>wrote:

> Just checking in here, has anyone here ever attempted to activate
> another plugin (or ensure it's activated, if not, then activate it)
> within a plugin? For example, when activating Plugin B, the Plugin B
> will activate Plugin A first (or if Plugin A is activated, continue;
> if Plugin A doesn't exist then send error to browser), then complete
> the rest of Plugin B specific activation.
>
> I have the craziest of thoughts!
>

Nah, it's not so crazy. You can use is_plugin_activated() and
activate_plugin().

Or, just add a header and forget about it:
http://wordpress.org/extend/plugins/plugin-dependencies/


More information about the wp-hackers mailing list