Filters the categories before building the category list.
$categories\WP_Term[]$post_idint|falsewp-includes/category-template.php:158get_the_category_list()<?php * @since 4.4.0 * * @param WP_Term[] $categories An array of the post's categories. * @param int|false $post_id ID of the post to retrieve categories for. * When `false`, defaults to the current post in the loop. */ $categories = apply_filters( 'the_category_list', get_the_category( $post_id ), $post_id ); if ( empty( $categories ) ) { /** This filter is documented in wp-includes/category-template.php */ return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents ); } Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.