customize_preview_{$this->id}

ACTION wp-includes\class-wp-customize-setting.php (ligne 405) github
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.

Paramètres

Entrée :
$this
Sortie :
@param WP_Customize_Setting $setting WP_Customize_Setting instance.

Utilisation

// Ajouter une fonction au hook action 'customize_preview_{$this->id}'
add_action('customize_preview_{$this->id}', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($this) {
    // Votre code ici
    error_log('Hook customize_preview_{$this->id} déclenché');
}

Actualités

Chargement des actualités...