create_{$taxonomy}

動作鉤子
do_action( "create_{$taxonomy}", $term_id, $tt_id, $args )
引數
  • (int) $term_id Term ID.
    Required:
  • (int) $tt_id Term taxonomy ID.
    Required:
  • (array) $args Arguments passed to wp_insert_term().
    Required:
定義位置
相關勾子
created_taxonomyregistered_taxonomyget_taxonomydelete_taxonomyedit_term_taxonomy
相關方法
get_taxonomyregister_taxonomyunregister_taxonomycreate_initial_taxonomiesthe_taxonomiesclean_taxonomy_cache
引入
6.1.0
棄用
-

create_{$taxonomy}是一個WordPress的動作鉤子,當為一個特定的分類法建立一個新的術語時被觸發。

在為一個特定的分類法建立一個新的術語後啟動。

鉤子名稱的動態部分,$taxonomy,指的是為該術語建立的分類法的lug。

可能的鉤子名稱包括:

  • create_category
  • create_post_tag
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( "create_{$taxonomy}", $term_id, $tt_id, $args );
do_action( "create_{$taxonomy}", $term_id, $tt_id, $args );
do_action( "create_{$taxonomy}", $term_id, $tt_id, $args );

常見問題

FAQs
檢視更多 >