apply_filters( 'post_edit_category_parent_dropdown_args', array $parent_dropdown_args )
- Since
- 4.4.0
Filters the arguments for the taxonomy parent dropdown on the Post Edit page.
Compatibility
- WordPress
- since 4.4.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$parent_dropdown_argsarray- { Optional. Array of arguments to generate parent dropdown.
@type string $taxonomy Name of the taxonomy to retrieve.
@type bool $hide_if_empty True to skip generating markup if no categories are found. Default 0.
@type string $name Value for the 'name' attribute of the select element.
Default "new{$tax_name}_parent".
@type string $orderby Which column to use for ordering terms. Default 'name'.
@type bool|int $hierarchical Whether to traverse the taxonomy hierarchy. Default 1.
@type string $show_option_none Text to display for the "none" option.
Default "— {$parent} —", where$parentis 'parent_item' taxonomy label.
}$taxonomystringName of the taxonomy to retrieve.$hide_if_emptyboolTrue to skip generating markup if no categories are found. Default 0.$namestringValue for the 'name' attribute of the select element. Default "new{$tax_name}_parent".$orderbystringWhich column to use for ordering terms. Default 'name'.$hierarchicalbool|intWhether to traverse the taxonomy hierarchy. Default 1.$show_option_nonestringText to display for the "none" option. Default "— {$parent} —", where$parentis 'parent_item' taxonomy label.
Where this hook fires · 2
wp-admin/includes/ajax-actions.php:703_wp_ajax_add_hierarchical_term()wp-admin/includes/meta-boxes.php:724post_categories_meta_box()
Source code
* @type string $show_option_none Text to display for the "none" option. * Default "— {$parent} —", * where `$parent` is 'parent_item' * taxonomy label. * } */ $parent_dropdown_args = apply_filters( 'post_edit_category_parent_dropdown_args', $parent_dropdown_args ); wp_dropdown_categories( $parent_dropdown_args ); ?> <input type="button" id="<?php echo $tax_name; ?>-add-submit" data-wp-lists="add:<?php echo $tax_name; ?>checklist:<?php echo $tax_name; ?>-add" class="button category-add-submit" value="<?php echo esc_attr( $taxonomy->labels->add_new_item ); ?>" /> <?php wp_nonce_field( 'add-' . $tax_name, '_ajax_nonce-add-' . $tax_name, false ); ?> <span id="<?php echo $tax_name; ?>-ajax-response"></span>Changelog
Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.