apply_filters( ‘the_category_list’, WP_Term[] $categories, int|false $post_id )

In this article

Filters the categories before building the category list.

Parameters

$categoriesWP_Term[]
An array of the post’s categories.
$post_idint|false
ID of the post to retrieve categories for.
When false, defaults to the current post in the loop.

Source

$categories = apply_filters( 'the_category_list', get_the_category( $post_id ), $post_id );

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.