activate plugins wordpress code example
Example 1: wordpress activate plugin
// Attempts activation of plugin in a “sandbox” and redirects on success.
activate_plugin( string $plugin, string $redirect = '',
bool $network_wide = false, bool $silent = false )
Example 2: wordpress activate plugins
// Activate multiple plugins.
activate_plugins( string|string[] $plugins, string $redirect = '',
bool $network_wide = false, bool $silent = false )