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

Filters the array of categories to return for a post.


Parameters

$categories

An array of categories to return for the post.

$post_id

The post ID.


Source

File: wp-includes/category-template.php

View on GitHub


Changelog

Changelog
Version Description
4.4.0 Added the $post_id parameter.
3.1.0 Introduced.