no_freedom
no_freedom

Reputation: 1961

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 activate specific plugins. thanks

Upvotes: 0

Views: 975

Answers (2)

no_freedom
no_freedom

Reputation: 1961

@me Quite Simple

  require_once('path../wp-admin/includes/plugin.php');
  activate_plugin($plugin_path);    // Activate Plugin

Upvotes: 1

Nikolay Yordanov
Nikolay Yordanov

Reputation: 1404

You can include() the plugin's main php file, but you may have some problems with some of the plugin's hooks so beware :)

Upvotes: 0

Related Questions