apply_filters( 'taxonomy_parent_dropdown_args', array $dropdown_args, string $taxonomy, string $context )
- Since
- 3.7.0, 4.2.0
Filters the taxonomy parent drop-down on the Edit Term page.
Compatibility
- WordPress
- since 4.2.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
$dropdown_argsarray- { 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'.
}$hide_emptyint|boolWhether to hide terms not attached to any posts. Default 0.$hide_if_emptyboolWhether to hide the drop-down if no terms exist. Default false.$taxonomystringThe taxonomy slug.$namestringValue of the name attribute to use for the drop-down select element. Default 'parent'.$orderbystringThe field to order by. Default 'name'.$hierarchicalboolWhether the taxonomy is hierarchical. Default true.$show_option_nonestringLabel to display if there are no terms. Default 'None'.
$taxonomystring- The taxonomy slug.
$contextstring- Filter context. Accepts 'new' or 'edit'.
Where this hook fires · 2
wp-admin/edit-tag-form.php:194file scopewp-admin/edit-tags.php:508file scope
Source code
* @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'. * } * @param string $taxonomy The taxonomy slug. * @param string $context Filter context. Accepts 'new' or 'edit'. */ $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' ); $dropdown_args['aria_describedby'] = 'parent-description'; wp_dropdown_categories( $dropdown_args ); ?> <?php if ( 'category' === $taxonomy ) : ?>Changelog
Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.2.0
Added
$context parameter.from the docblock3.7.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 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.