walk_category_dropdown_tree( mixed $args ): string
- Since
- 2.1.0, 5.3.0
- Source
wp-includes/category-template.php:1137
Retrieves HTML dropdown (select) content for category list.
Parameters
$argsmixed- Elements array, maximum hierarchical depth and optional additional arguments.
Return
string
Uses · 1
- Walker_CategoryDropdown::__construct()
Used by · 1
- wp_dropdown_categories()Displays or retrieves the HTML dropdown list of categories.
Source
function walk_category_dropdown_tree( ...$args ) { // The user's options are the third parameter. if ( empty( $args[2]['walker'] ) || ! ( $args[2]['walker'] instanceof Walker ) ) { $walker = new Walker_CategoryDropdown(); } else { /** * @var Walker $walker */ $walker = $args[2]['walker']; } return $walker->walk( ...$args );}History
Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.3.0
Formalized the existing
...$args parameter by adding it to the function signature.from the docblock2.1.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/category-template.php, 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.