added_term_relationship

动作钩子
do_action( 'added_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:
定义位置
相关勾子
add_term_relationshipdeleted_term_relationshipsdelete_term_relationshipsredirect_term_locationedit_term_link
相关方法
wp_delete_object_term_relationshipsadd_term_metaedit_term_linkadd_site_option_pad_term_countsget_term_link
引入
4.7.0
弃用
-

added_term_relationship是一个动作钩子,当一个术语被添加到一个对象,如文章或用户,就会被触发。

在一个对象-条款关系被添加后立即发生触发。

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

常见问题

FAQs
查看更多 >