term_exists_default_query_args

過濾鉤子
apply_filters( 'term_exists_default_query_args', $defaults, $term, $taxonomy, $parent )
引數
  • (array) $defaults An array of arguments passed to get_terms().
    Required:
  • (int|string) $term The term to check. Accepts term ID, slug, or name.
    Required:
  • (string) $taxonomy The taxonomy name to use. An empty string indicates the search is against all taxonomies.
    Required:
  • (int|null) $parent ID of parent term under which to confine the exists search. Null indicates the search is unconfined.
    Required:
定義位置
相關勾子
users_list_table_query_argsms_sites_list_table_query_argstwentyfourteen_list_authors_query_argswp_sitemaps_posts_query_argscomments_list_table_query_args
相關方法
register_default_headersunregister_default_headersrest_api_default_filtersrest_validate_request_argwp_removable_query_argsremove_query_arg
引入
6.0.0
棄用
-

term_exists_default_query_args是一個過濾器,允許開發者修改term_exists函式中使用的預設查詢引數。term_exists函式用於檢查WordPress資料庫中的術語是否存在。

篩選預設查詢引數以檢查是否存在術語。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$defaults = apply_filters( 'term_exists_default_query_args', $defaults, $term, $taxonomy, $parent );
$defaults = apply_filters( 'term_exists_default_query_args', $defaults, $term, $taxonomy, $parent );
$defaults = apply_filters( 'term_exists_default_query_args', $defaults, $term, $taxonomy, $parent );

常見問題

FAQs
檢視更多 >