Ticket #20450: 20450.diff
| File 20450.diff, 2.0 KB (added by , 14 years ago) |
|---|
-
wp-includes/category-template.php
328 328 329 329 $tab_index_attribute = ''; 330 330 if ( (int) $tab_index > 0 ) 331 $tab_index_attribute = " tabindex=\"$tab_index\"";331 $tab_index_attribute = ' tabindex="' . $tab_index .'"'; 332 332 333 333 $categories = get_terms( $taxonomy, $r ); 334 334 $name = esc_attr( $name ); … … 336 336 $id = $id ? esc_attr( $id ) : $name; 337 337 338 338 if ( ! $r['hide_if_empty'] || ! empty($categories) ) 339 $output = "<select name='$name' id='$id' class='$class' $tab_index_attribute>\n";339 $output = '<select name="' . $name . '" id="' . $id . '" class="' . $class . '" ' . $tab_index_attribute . '>' . "\n"; 340 340 else 341 341 $output = ''; 342 342 343 343 if ( empty($categories) && ! $r['hide_if_empty'] && !empty($show_option_none) ) { 344 344 $show_option_none = apply_filters( 'list_cats', $show_option_none ); 345 $output .= "\t <option value='-1' selected='selected'>$show_option_none</option>\n";345 $output .= "\t" . '<option value="-1" selected="selected">' . $show_option_none . '</option>' . "\n"; 346 346 } 347 347 348 348 if ( ! empty( $categories ) ) { … … 350 350 if ( $show_option_all ) { 351 351 $show_option_all = apply_filters( 'list_cats', $show_option_all ); 352 352 $selected = ( '0' === strval($r['selected']) ) ? " selected='selected'" : ''; 353 $output .= "\t <option value='0'$selected>$show_option_all</option>\n";353 $output .= "\t" . '<option value="0"' . $selected . '>' . $show_option_all . '</option>' . "\n"; 354 354 } 355 355 356 356 if ( $show_option_none ) { 357 357 $show_option_none = apply_filters( 'list_cats', $show_option_none ); 358 358 $selected = ( '-1' === strval($r['selected']) ) ? " selected='selected'" : ''; 359 $output .= "\t <option value='-1'$selected>$show_option_none</option>\n";359 $output .= "\t" . '<option value="-1"' . $selected . '>' . $show_option_none . '</option>'. "\n"; 360 360 } 361 361 362 362 if ( $hierarchical )