delete_term

动作钩子
do_action( 'delete_term', $term, $tt_id, $taxonomy, $deleted_term, $object_ids )
参数
  • (int) $term Term ID.
    Required:
  • (int) $tt_id Term taxonomy ID.
    Required:
  • (string) $taxonomy Taxonomy slug.
    Required:
  • (WP_Term) $deleted_term Copy of the already-deleted term.
    Required:
  • (array) $object_ids List of term object IDs.
    Required:
定义位置
相关勾子
delete_themepre_delete_termdeleted_themedelete_userdeleted_user
相关方法
wp_delete_termdelete_themedelete_term_metadelete_usermetaget_termdelete_site_meta
引入
4.5.0
弃用
-

delete_term: 这个函数用于从WordPress分类法中删除一个术语。它通常用于删除一个不再需要的术语。

在一个术语从数据库中被删除并且缓存被清理后触发。

{@see ‘delete_$taxonomy’}钩子也可用于针对特定的分类法。

do_action( 'delete_term', $term, $tt_id, $taxonomy, $deleted_term, $object_ids );

常见问题

FAQs
查看更多 >