akcjadynamicznyod 3.4.0
customize_preview_{$this->id}
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->id, refers to the setting ID.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$setting | \WP_Customize_Setting | WP_Customize_Setting instance. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_action( 'customize_preview_{$this->id}', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_action( 'customize_preview_{$this->id}', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii