akcjadynamicznyod 2.9.0
update_site_option_{$option}
Args 4Plik wp-includes/option.php
Opis — z kodu źródłowego
Fires after the value of a specific network option has been successfully updated.
The dynamic portion of the hook name, $option, refers to the option name.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$option | string | Name of the network option. |
$value | mixed | Current value of the network option. |
$old_value | mixed | Old value of the network option. |
$network_id | int | ID of the network. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'update_site_option_{$option}', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'update_site_option_{$option}', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii