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