开发者

How to activate plugins automatically in the theme WordpressMu?

开发者 https://www.devze.com 2023-02-24 22:50 出处:网络
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

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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消