customize_post_value_set_{$setting_id}

ACTION wp-includes\class-wp-customize-manager.php (ligne 1882) github
Announces when a specific setting's unsanitized post value has been set. Fires when the WP_Customize_Manager::set_post_value() method is called. The dynamic portion of the hook name, `$setting_id`, refers to the setting ID.

Paramètres

Entrée :
$value, $this
Sortie :
@param mixed                $value   Unsanitized setting post value.
@param WP_Customize_Manager $manager WP_Customize_Manager instance.

Utilisation

// Ajouter une fonction au hook action 'customize_post_value_set_{$setting_id}'
add_action('customize_post_value_set_{$setting_id}', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($value, $this) {
    // Votre code ici
    error_log('Hook customize_post_value_set_{$setting_id} déclenché');
}

Actualités

Chargement des actualités...