term_{$field}

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

term_{$field}是一個過濾器,允許開發者修改一個特定術語欄位的值。例如,term_name是允許開發者修改術語名稱的過濾器。

過濾要顯示的術語欄位。

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

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

常見問題

FAQs
檢視更多 >