post_edit_category_parent_dropdown_args filter-hookWP 4.4.0

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

Usage

add_filter( 'post_edit_category_parent_dropdown_args', 'wp_kama_post_edit_category_parent_dropdown_args_filter' );

/**
 * Function for `post_edit_category_parent_dropdown_args` filter-hook.
 * 
 * @param array $parent_dropdown_args Optional. Array of arguments to generate parent dropdown.
 *
 * @return array
 */
function wp_kama_post_edit_category_parent_dropdown_args_filter( $parent_dropdown_args ){

	// filter...
	return $parent_dropdown_args;
}
$parent_dropdown_args(array)

Optional. Array of arguments to generate parent dropdown.

  • taxonomy(string)
    Name of the taxonomy to retrieve.

  • hide_if_empty(true|false)
    True to skip generating markup if no categories are found.

  • 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(true|false|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

Changelog

Since 4.4.0 Introduced.

Where the hook is called

post_categories_meta_box()
post_edit_category_parent_dropdown_args
wp-admin/includes/meta-boxes.php 724
$parent_dropdown_args = apply_filters( 'post_edit_category_parent_dropdown_args', $parent_dropdown_args );

Where the hook is used in WordPress

Usage not found.