post_edit_category_parent_dropdown_args WordPress Filter Hook

The post_edit_category_parent_dropdown_args hook is used to modify the arguments used in the category parent dropdown on the post editing screen. This hook is useful for customizing which arguments are used in the dropdown, and for customizing the output of the dropdown.

apply_filters( 'post_edit_category_parent_dropdown_args', array $parent_dropdown_args ) #

Filters the arguments for the taxonomy parent dropdown on the Post Edit page.


Parameters

$parent_dropdown_args

(array)Array of arguments to generate parent dropdown.

  • 'taxonomy'
    (string) Name of the taxonomy to retrieve.
  • 'hide_if_empty'
    (bool) True to skip generating markup if no categories are found. Default 0.
  • 'name'
    (string) Value for the 'name' attribute of the select element. Default "new{$tax_name}_parent".
  • 'orderby'
    (string) Which column to use for ordering terms. Default 'name'.
  • 'hierarchical'
    (bool|int) Whether to traverse the taxonomy hierarchy. Default 1.
  • 'show_option_none'
    (string) Text to display for the "none" option. Default "— {$parent} —", where $parent is 'parent_item' taxonomy label.


Top ↑

Source

File: wp-admin/includes/meta-boxes.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.