post_link_category

过滤钩子
apply_filters( 'post_link_category', $cats[0], $cats, $post )
参数
  • (WP_Term) $cat The category to use in the permalink.
    Required:
  • (array) $cats Array of all categories (WP_Term objects) associated with the post.
    Required:
  • (WP_Post) $post The post in question.
    Required:
定义位置
相关勾子
link_categorythe_categorypost_linkwp_link_querynext_posts_link_attributes
相关方法
in_categorywp_insert_categorywp_set_link_catswp_ajax_add_link_categoryis_categorywp_link_category_checklist
引入
3.5.0
弃用
-

post_thumbnail_id: 这个钩子允许你在保存之前修改文章缩略图(特色图片)的ID。

过滤%category%固定链接令牌中使用的类别。

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 16:32:56

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: