W3cubDocs

/WordPress

apply_filters( 'get_the_categories', WP_Term[] $categories, int|false $post_id )

Filters the array of categories to return for a post.

Parameters

$categories

(WP_Term[]) An array of categories to return for the post.

$post_id

(int|false) ID of the post.

Source

File: wp-includes/category-template.php

View on Trac

Changelog

Version Description
4.4.0 Added $post_id parameter.
3.1.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_the_categories