Changeset 53913 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 08/19/2022 11:04:04 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r53715 r53913 301 301 * @since 4.2.0 Introduced the `value_field` argument. 302 302 * @since 4.6.0 Introduced the `required` argument. 303 * @since 6.1.0 Introduced the `aria_describedby` argument. 303 304 * 304 305 * @param array|string $args { … … 336 337 * @type Walker $walker Walker object to use to build the output. Default empty which results in a 337 338 * Walker_CategoryDropdown instance being used. 339 * @type string $aria_describedby The 'id' of an element that contains descriptive text for the select. 340 * Default empty string. 338 341 * } 339 342 * @return string HTML dropdown list of categories. … … 362 365 'value_field' => 'term_id', 363 366 'required' => false, 367 'aria_describedby' => '', 364 368 ); 365 369 … … 407 411 $required = $parsed_args['required'] ? 'required' : ''; 408 412 413 $aria_describedby_attribute = $parsed_args['aria_describedby'] ? ' aria-describedby="' . esc_attr( $parsed_args['aria_describedby'] ) . '"' : ''; 414 409 415 if ( ! $parsed_args['hide_if_empty'] || ! empty( $categories ) ) { 410 $output = "<select $required name='$name' id='$id' class='$class' $tab_index_attribute>\n";416 $output = "<select $required name='$name' id='$id' class='$class'$tab_index_attribute$aria_describedby_attribute>\n"; 411 417 } else { 412 418 $output = '';
Note: See TracChangeset
for help on using the changeset viewer.