activate_plugin Wordpress function


Description:

Attempts activation of plugin in a "sandbox" and redirects on success.


Syntax:


Arguments:

(string) $plugin Plugin path to main plugin file with plugin data.
(string) $redirect Optional. URL to redirect to.
(bool) $network_wide Whether to enable the plugin for all sites in the network or just the current site. Multisite only. Default is false.
(bool) $silent Prevent calling activation hooks. Optional, default is false.


Return Type:

(WP_Error|null) WP_Error on invalid file or null on success.


Define At:

wp-admin/includes/plugin.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/activate_plugin


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×