Opened 11 years ago
Closed 11 years ago
#32330 closed defect (bug) (fixed)
Option not selected in Walker_CategoryDropdown
| Reported by: | tlexcellent | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.3 |
| Component: | Taxonomy | Version: | 4.3 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | template |
Description
In function start_el() of class Walker_CategoryDropdown (wp-includes/category-template.php), when argument value_field is set, selected option should check value_field and not always term_id.
Change :
if ( $category->term_id == $args['selected'] ) $output .= ' selected="selected"';
For :
if ( $category->{$args['value_field']} == $args['selected'] )
$output .= ' selected="selected"';
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Good find. Thanks for the report, tlexcellent.