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



post_link_category ›

Since3.5.0
已弃用n/a
apply_filters( 'post_link_category', $cats[0], $cats, $post )
参数: (3)
  • (WP_Term) $cat The category to use in the permalink.
    Required: Yes
  • (array) $cats Array of all categories (WP_Term objects) associated with the post.
    Required: Yes
  • (WP_Post) $post The post in question.
    Required: Yes
定义在:
文档:

Filters the category that gets used in the %category% permalink token.





源码

$category_object = apply_filters( 'post_link_category', $cats[0], $cats, $post );