apply_filters( 'the_category', string $thelist, string $separator, string $parents )
- Since
- 1.2.0
Filters the category or list of categories.
Compatibility
- WordPress
- since 1.2.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$theliststring- List of categories for the current post.
$separatorstring- Separator used between the categories.
$parentsstring- How to display the category parents. Accepts 'multiple', 'single', or empty.
Where this hook fires · 8
wp-admin/edit-tags.php:634file scopewp-admin/includes/class-walker-category-checklist.php:108Walker_Category_Checklist::start_el()wp-admin/includes/class-walker-category-checklist.php:120Walker_Category_Checklist::start_el()wp-admin/includes/template.php:250wp_popular_terms_checklist()wp-admin/includes/template.php:298wp_link_category_checklist()wp-includes/category-template.php:146get_the_category_list()wp-includes/category-template.php:162get_the_category_list()wp-includes/category-template.php:230get_the_category_list()
Source code
* * @param string $thelist List of categories for the current post. * @param string $separator Separator used between the categories. * @param string $parents How to display the category parents. Accepts 'multiple', * 'single', or empty. */ return apply_filters( 'the_category', $thelist, $separator, $parents );} /** * Checks if the current post is within any of the given categories. * * The given categories are checked against the post's categories' term_ids, names and slugs.Changelog
Introduced in 1.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.