A WordPress-centric search engine for devs and theme authors



get_the_categories ›

Since4.4.0
Deprecatedn/a
apply_filters( 'get_the_categories', $categories, $id )
Parameters: (2)
  • (WP_Term[]) $categories An array of categories to return for the post.
    Required: Yes
  • (int|false) $id ID of the post.
    Required: Yes
Defined at:
Codex:

Filters the array of categories to return for a post.





Source

return apply_filters( 'get_the_categories', $categories, $id );