[wp-trac] [WordPress Trac] #32330: Option not selected in Walker_CategoryDropdown
WordPress Trac
noreply at wordpress.org
Sun May 10 06:42:30 UTC 2015
#32330: Option not selected in Walker_CategoryDropdown
--------------------------+-----------------------------
Reporter: tlexcellent | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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"';
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32330>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list