get_object_subtype_{$object_type}

FILTER wp-includes\meta.php (ligne 1854) github
Filters the object subtype identifier. The dynamic portion of the hook name, `$object_type`, refers to the meta object type (blog, post, comment, term, user, or any other type with an associated meta table). Possible hook names include:  - `get_object_subtype_blog`  - `get_object_subtype_post`  - `get_object_subtype_comment`  - `get_object_subtype_term`  - `get_object_subtype_user`

Paramètres

Entrée :
$object_subtype, $object_id
Sortie :
@param string $object_subtype Object subtype or empty string to override.
@param int    $object_id      ID of the object to get the subtype for.

Utilisation

// Modifier la valeur avec le filtre 'get_object_subtype_{$object_type}'
add_filter('get_object_subtype_{$object_type}', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...