get_{$taxonomy}

FILTER wp-includes\taxonomy.php (ligne 1040) github
Filters a taxonomy term object. The dynamic portion of the hook name, `$taxonomy`, refers to the slug of the term's taxonomy. Possible hook names include:  - `get_category`  - `get_post_tag`

Paramètres

Entrée :
$_term, $taxonomy
Sortie :
@param WP_Term $_term    Term object.
@param string  $taxonomy The taxonomy slug.

Utilisation

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

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

Actualités

Chargement des actualités...