akcjadynamicznyod 3.4.0
customize_update_{$this->type}
Args 2Plik wp-includes/class-wp-customize-setting.php
Opis — z kodu źródłowego
Fires when the WP_Customize_Setting::update() method is called for settings not handled as theme_mods or options.
The dynamic portion of the hook name, $this->type, refers to the type of setting.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | mixed | Value of the setting. |
$setting | \WP_Customize_Setting | WP_Customize_Setting instance. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'customize_update_{$this->type}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'customize_update_{$this->type}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii