taxonomy_parent_dropdown_args

過濾鉤子
apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' )
引數
  • (array) $dropdown_args { An array of taxonomy parent drop-down arguments. @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0. @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false. @type string $taxonomy The taxonomy slug. @type string $name Value of the name attribute to use for the drop-down select element. Default 'parent'. @type string $orderby The field to order by. Default 'name'. @type bool $hierarchical Whether the taxonomy is hierarchical. Default true. @type string $show_option_none Label to display if there are no terms. Default 'None'. }
    Required:
  • (string) $taxonomy The taxonomy slug.
    Required:
  • (string) $context Filter context. Accepts 'new' or 'edit'.
    Required:
定義位置
相關勾子
post_edit_category_parent_dropdown_argslogin_language_dropdown_argswidget_archives_dropdown_argswp_dropdown_users_argstaxonomy_pre_edit_form
相關方法
parent_dropdownwalk_page_dropdown_treewp_dropdown_pageswp_dropdown_catswp_get_term_taxonomy_parent_idwp_dropdown_roles
引入
4.2.0
棄用
-

taxonomy_parent_dropdown_args:這是一個WordPress過濾鉤子,允許開發者改變用於建立分類法的父下拉的引數。

過濾編輯術語頁上的分類法父級下拉。

$dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' );

常見問題

FAQs
檢視更多 >