WordPress at a glance
filter is not described

get_the_categories filter-hook . WP 3.1.0

Filters the array of categories to return for a post.

Usage

add_filter( 'get_the_categories', 'filter_function_name_8416', 10, 2 );
function filter_function_name_8416( $categories, $id ){
	// filter...

	return $categories;
}
$categories(array)
An array of categories to return for the post.
$id(int)
ID of the post.

Notes

  • Since 4.4.0 Added $id parameter.

Where the hook is called

get_the_category()
get_the_categories
wp-includes/category-template.php 94
return apply_filters( 'get_the_categories', $categories, $id );

Where the hook is used (in WP core)

Does not used.