the_category_list

the_category_list

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.4.3

apply_filters('the_category_list') is found 1 times:

  • /wp-includes/category-template.php line 158
    	 * @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 );
    	}