Ticket #12494: 12494.diff
File 12494.diff, 1.3 KB (added by , 15 years ago) |
---|
-
classes.php
1262 1262 */ 1263 1263 function start_el(&$output, $page, $depth, $args) { 1264 1264 $pad = str_repeat(' ', $depth * 3); 1265 1266 $value = ( 'slug' == $args['value_output'] ) ? $page->post_name : $post->ID; 1265 1267 1266 $output .= "\t<option class=\"level-$depth\" value=\"$ page->ID\"";1267 if ( $ page->ID== $args['selected'] )1268 $output .= "\t<option class=\"level-$depth\" value=\"$value\""; 1269 if ( $value == $args['selected'] ) 1268 1270 $output .= ' selected="selected"'; 1269 1271 $output .= '>'; 1270 1272 $title = esc_html($page->post_title); … … 1454 1456 */ 1455 1457 function start_el(&$output, $category, $depth, $args) { 1456 1458 $pad = str_repeat(' ', $depth * 3); 1459 1460 $value = ( 'slug' == $args['value_output'] ) ? $category->slug : $category->term_id; 1457 1461 1458 1462 $cat_name = apply_filters('list_cats', $category->name, $category); 1459 $output .= "\t<option class=\"level-$depth\" value=\"".$ category->term_id."\"";1460 if ( $ category->term_id== $args['selected'] )1463 $output .= "\t<option class=\"level-$depth\" value=\"".$value."\""; 1464 if ( $value == $args['selected'] ) 1461 1465 $output .= ' selected="selected"'; 1462 1466 $output .= '>'; 1463 1467 $output .= $pad.$cat_name;