activated_plugin хук-событиеWP 2.9.0

Fires after a plugin has been activated.

If a plugin is silently activated (such as during an update), this hook does not fire.

Использование

add_action( 'activated_plugin', 'wp_kama_activated_plugin_action', 10, 2 );

/**
 * Function for `activated_plugin` action-hook.
 * 
 * @param string $plugin       Path to the plugin file relative to the plugins directory.
 * @param bool   $network_wide Whether to enable the plugin for all sites in the network or just the current site. Multisite only.
 *
 * @return void
 */
function wp_kama_activated_plugin_action( $plugin, $network_wide ){

	// action...
}
$plugin(строка)
Path to the plugin file relative to the plugins directory.
$network_wide(true|false)
Whether to enable the plugin for all sites in the network or just the current site. Multisite only.
По умолчанию: false

Список изменений

С версии 2.9.0 Введена.

Где вызывается хук

activate_plugin()
activated_plugin
wp-admin/includes/plugin.php 718
do_action( 'activated_plugin', $plugin, $network_wide );

Где используется хук в WordPress

Использование не найдено.