Core Function
View Source on Trac ↗ activate_plugins()
activate_plugins(
mixed $plugins,
mixed $redirect = '',
mixed $network_wide = false,
mixed $silent = false
) Activates multiple plugins.
Parameters 2 required
| Name / Type | Description |
|---|---|
| (string | | string[]) $plugins Single plugin or list of plugins to activate. Required |
| $redirect string | Redirect to page after successful activation. |
| bool | $network_wide Whether to enable the plugin for all sites in the network. Default false. Required |
| $silent bool | Prevent calling activation hooks. Default false. |
Return Value
((true)
| WP_Error) True when finished or WP_Error if there were errors during a plugin activation.
Function Information
Since Version
2.6.0
Source File
wp-admin/includes/plugin.php
Advertisement