Filters the value of an existing site transient before it is retrieved. The dynamic portion of the hook name, `$transient`, refers to the transient name. Returning a value other than boolean false will short-circuit retrieval and return that value instead.
false, $transient
Sortie :
@param mixed $pre_site_transient The default value to return if the site transient does not exist. @param string $transient Transient name.
// Modifier la valeur avec le filtre 'pre_site_transient_{$transient}'
add_filter('pre_site_transient_{$transient}', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(false) {
// Modifier la valeur
return false;
}
Chargement des actualités...