add_site_option_(option) хук-событиеWP 3.0.0

Fires after a specific network option has been successfully added.

The dynamic portion of the hook name, $option, refers to the option name.

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

add_action( 'add_site_option_(option)', 'wp_kama_add_site_option_option_action', 10, 3 );
function wp_kama_add_site_option_option_action( $option, $value, $network_id ){
	// action...
}
$option(строка)
Name of the network option.
$value(разное)
Value of the network option.
$network_id(int)
ID of the network.

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

С версии 3.0.0 Введена.
С версии 2.9.0 As "add_site_option_{$key}"
С версии 4.7.0 The $network_id parameter was added.

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

add_network_option()
add_site_option_(option)
wp-includes/option.php 1595
do_action( "add_site_option_{$option}", $option, $value, $network_id );

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

wp-admin/includes/ms-admin-filters.php 43
add_action( 'add_site_option_new_admin_email', 'update_network_option_new_admin_email', 10, 2 );