How to activate plugins automatically in the theme WordpressMu?
How can I activate plugin using function.php? so when the theme is activated, it will also a开发者_运维技巧ctivate specific plugins. thanks
@me Quite Simple
require_once('path../wp-admin/includes/plugin.php');
activate_plugin($plugin_path); // Activate Plugin
You can include() the plugin's main php file, but you may have some problems with some of the plugin's hooks so beware :)
精彩评论