Changeset 32484 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 05/11/2015 01:10:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r32292 r32484 1166 1166 $cat_name = apply_filters( 'list_cats', $category->name, $category ); 1167 1167 1168 if ( ! isset( $args['value_field'] ) || ! isset( $category->{$args['value_field']} ) ) { 1169 $args['value_field'] = 'term_id'; 1170 } 1171 1172 $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$args['value_field']} ) . "\""; 1173 1174 if ( $category->term_id == $args['selected'] ) 1168 if ( isset( $args['value_field'] ) && isset( $category->{$args['value_field']} ) ) { 1169 $value_field = $args['value_field']; 1170 } else { 1171 $value_field = 'term_id'; 1172 } 1173 1174 $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . "\""; 1175 1176 if ( $category->{$value_field} == $args['selected'] ) 1175 1177 $output .= ' selected="selected"'; 1176 1178 $output .= '>';
Note: See TracChangeset
for help on using the changeset viewer.