update_{$meta_type}_metadata_cache

FILTER wp-includes\meta.php (ligne 1182) github
Short-circuits updating the metadata cache of a specific type. The dynamic portion of the hook name, `$meta_type`, refers to the meta object type (blog, post, comment, term, user, or any other type with an associated meta table). Returning a non-null value will effectively short-circuit the function. Possible hook names include:  - `update_blog_metadata_cache`  - `update_post_metadata_cache`  - `update_comment_metadata_cache`  - `update_term_metadata_cache`  - `update_user_metadata_cache`

Paramètres

Entrée :
null, $object_ids
Sortie :
@param mixed $check      Whether to allow updating the meta cache of the given type.
@param int[] $object_ids Array of object IDs to update the meta cache for.

Utilisation

// Modifier la valeur avec le filtre 'update_{$meta_type}_metadata_cache'
add_filter('update_{$meta_type}_metadata_cache', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...