wpseo_activate()
Run single site / network-wide activation of the plugin.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wpseo_activate( $networkwide );
- $networkwide(true|false)
- Whether the plugin is being activated network-wide.
По умолчанию:false
Код wpseo_activate() wpseo activate Yoast 27.7
function wpseo_activate( $networkwide = false ) {
if ( ! is_multisite() || ! $networkwide ) {
_wpseo_activate();
}
else {
/* Multi-site network activation - activate the plugin for all blogs. */
wpseo_network_activate_deactivate( true );
}
// This is done so that the 'uninstall_{$file}' is triggered.
register_uninstall_hook( WPSEO_FILE, '__return_false' );
}