Filters the categories before building the category list.
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.
// 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;
}
Chargement des actualités...