customize_post_value_set

ACTION wp-includes\class-wp-customize-manager.php (ligne 1898) github
Announces when any setting's unsanitized post value has been set. Fires when the WP_Customize_Manager::set_post_value() method is called. This is useful for `WP_Customize_Setting` instances to watch in order to update a cached previewed value.

Paramètres

Entrée :
$setting_id, $value, $this
Sortie :
@param string               $setting_id Setting ID.
@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'
add_action('customize_post_value_set', 'ma_fonction_personnalisee', 10, 1);

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

Actualités

Chargement des actualités...