pre_wp_load_alloptions

FILTER wp-includes\option.php (ligne 615) github
Filters the array of alloptions before it is populated. Returning an array from the filter will effectively short circuit wp_load_alloptions(), returning that value instead.

Paramètres

Entrée :
null, $force_cache
Sortie :
@param array|null $alloptions  An array of alloptions. Default null.
@param bool       $force_cache Whether to force an update of the local cache from the persistent cache. Default false.

Utilisation

// Modifier la valeur avec le filtre 'pre_wp_load_alloptions'
add_filter('pre_wp_load_alloptions', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...