term_{$field}

FILTER wp-includes\taxonomy.php (ligne 1900) github
Filters the term field sanitized for display. The dynamic portion of the hook name, `$field`, refers to the term field name.

Paramètres

Entrée :
$value, $term_id, $taxonomy, $context
Sortie :
@param mixed  $value    Value of the term field.
@param int    $term_id  Term ID.
@param string $taxonomy Taxonomy slug.
@param string $context  Context to retrieve the term field value.

Utilisation

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

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

Actualités

Chargement des actualités...