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', 'action_function_name_5336', 10, 2 ); function action_function_name_5336( $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 | Введена. |
Где вызывается хук
wp-admin/includes/plugin.php 728
do_action( 'activated_plugin', $plugin, $network_wide );