add_term_relationship

动作钩子
do_action( 'add_term_relationship', $object_id, $tt_id, $taxonomy )
参数
  • (int) $object_id Object ID.
    Required:
  • (int) $tt_id Term taxonomy ID.
    Required:
  • (string) $taxonomy Taxonomy slug.
    Required:
定义位置
相关勾子
added_term_relationshipdeleted_term_relationshipsdelete_term_relationshipsadd_site_optionredirect_term_location
相关方法
wp_delete_object_term_relationshipsadd_term_metaadd_site_option_pad_term_countsadd_actionedit_term_link
引入
4.7.0
弃用
-

add_term_relationship。这个钩子用于添加术语和对象之间的关系,如文章、用户、或评论。

在添加对象项关系之前立即发生触发。

do_action( 'add_term_relationship', $object_id, $tt_id, $taxonomy );

常见问题

FAQs
查看更多 >