pre_update_site_option_(option) хук-фильтр . WP 3.0.0
Filters a specific network option before its value is updated.
The dynamic portion of the hook name, $option, refers to the option name.
Использование
add_filter( 'pre_update_site_option_(option)', 'filter_function_name_8519', 10, 4 ); function filter_function_name_8519( $value, $old_value, $option, $network_id ){ // filter... return $value; }
- $value(смешанный)
- New value of the network option.
- $old_value(смешанный)
- Old value of the network option.
- $option(строка)
- Option name.
- $network_id(число)
- ID of the network.
Список изменений
С версии 3.0.0 | Введена. |
С версии 2.9.0 | As 'pre_update_site_option_' . $key |
С версии 4.4.0 | The $option parameter was added. |
С версии 4.7.0 | The $network_id parameter was added. |
Где вызывается хук
wp-includes/option.php 1697
$value = apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option, $network_id );