{$taxonomy}_edit_form_fields

動作鉤子
do_action( "{$taxonomy}_edit_form_fields", $tag, $taxonomy )
引數
  • (WP_Term) $tag Current taxonomy term object.
    Required:
  • (string) $taxonomy Current taxonomy slug.
    Required:
定義位置
相關勾子
taxonomy_add_form_fieldstaxonomy_edit_formcomment_form_fieldstaxonomy_pre_edit_formtaxonomy_term_edit_form_top
相關方法
taxonomy_existssanitize_term_fieldcomment_id_fieldstype_url_form_filecomment_form_titleget_term_field
引入
3.0.0
棄用
-

{$taxonomy}_edit_form_fields: 這是一個WordPress的動作鉤子,允許開發者在編輯分類表時新增自定義欄位。和{$taxonomy}_add_form_fields鉤子一樣,這個鉤子的名字是動態的,並且取決於分類法的名稱。

顯示“Edit Term”表單欄位後觸發。

鉤子名稱的動態部分$taxonom引用了分類slug。

可能的鉤子名稱包括:

  • category_edit_form_fields
  • post_tag_edit_form_fields
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( "{$taxonomy}_edit_form_fields", $tag, $taxonomy );
do_action( "{$taxonomy}_edit_form_fields", $tag, $taxonomy );
do_action( "{$taxonomy}_edit_form_fields", $tag, $taxonomy );

常見問題

FAQs
檢視更多 >