edit_term_{$field}

過濾鉤子
apply_filters( "edit_term_{$field}", $value, $term_id, $taxonomy )
引數
  • (mixed) $value Value of the term field.
    Required:
  • (int) $term_id Term ID.
    Required:
  • (string) $taxonomy Taxonomy slug.
    Required:
定義位置
相關勾子
get_terms_fieldsedit_user_fieldedit_term_linkedit_termpre_term_field
相關方法
get_term_fieldsanitize_term_fieldedit_term_linkget_post_fieldget_term_childrenget_edit_term_link
引入
2.3.0
棄用
-

edit_term_{$field}: 這個過濾器是用來在編輯術語時修改一個特定的欄位。過濾器的名稱是動態的,包括作為變數的欄位名。

在清理術語欄位之前過濾要編輯的術語欄位。

鉤子名稱的動態部分$field是指術語欄位。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$value = apply_filters( "edit_term_{$field}", $value, $term_id, $taxonomy );
$value = apply_filters( "edit_term_{$field}", $value, $term_id, $taxonomy );
$value = apply_filters( "edit_term_{$field}", $value, $term_id, $taxonomy );

常見問題

FAQs
檢視更多 >