WordPress开发者和主题制作者的搜索引擎



get_the_categories ›

Since4.4.0
已弃用n/a
apply_filters( 'get_the_categories', $categories, $id )
参数: (2)
  • (WP_Term[]) $categories An array of categories to return for the post.
    Required: Yes
  • (int|false) $id ID of the post.
    Required: Yes
定义在:
文档:

Filters the array of categories to return for a post.





源码

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