activate_plugins ( $plugins, $redirect = '', $network_wide = false, $silent = false )
- (string|string) plugins Single plugin or list of plugins to activate.
- (string) redirect Redirect to page after successful activation.
- (bool) network_wide Whether to enable the plugin for all sites in the network. Default false.
- (bool) silent Prevent calling activation hooks. Default false.
- (bool|WP_Error) True when finished or WP_Error if there were errors during a plugin activation.
- Introduced in WordPress: 2.6.0
- Deprecated in WordPress: —
Activates multiple plugins.When WP_Error is returned, it does not mean that one of the plugins had
errors. It means that one or more of the plugin file paths were invalid.
The execution will be halted as soon as one of the plugins has an error.