Filters whether to preempt a setting value update via the REST API. Allows hijacking the setting update logic and overriding the built-in behavior by returning true.
false, $name, $request[ $name ], $args
Sortie :
@param bool $result Whether to override the default behavior for updating the @param string $name Setting name (as shown in REST API responses). @param mixed $value Updated setting value. @param array $args Arguments passed to register_setting() for this setting.
// Modifier la valeur avec le filtre 'rest_pre_update_setting'
add_filter('rest_pre_update_setting', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(false) {
// Modifier la valeur
return false;
}
Chargement des actualités...