the_category_list

FILTER wp-includes\category-template.php (ligne 158) github
Filters the categories before building the category list.

Paramètres

Entrée :
get_the_category( $post_id
Sortie :
@param WP_Term[] $categories An array of the post's categories.
@param int|false $post_id    ID of the post to retrieve categories for.

Utilisation

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

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

Actualités

Chargement des actualités...