Changeset 28564 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 05/23/2014 08:46:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r28504 r28564 332 332 'class' => 'postform', 'depth' => 0, 333 333 'tab_index' => 0, 'taxonomy' => 'category', 334 'hide_if_empty' => false 334 'hide_if_empty' => false, 'option_none_value' => -1 335 335 ); 336 336 … … 344 344 345 345 $r = wp_parse_args( $args, $defaults ); 346 $option_none_value = $r['option_none_value']; 346 347 347 348 if ( ! isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) { … … 382 383 */ 383 384 $show_option_none = apply_filters( 'list_cats', $r['show_option_none'] ); 384 $output .= "\t<option value=' -1' selected='selected'>$show_option_none</option>\n";385 $output .= "\t<option value='" . esc_attr( $option_none_value ) . "' selected='selected'>$show_option_none</option>\n"; 385 386 } 386 387 … … 399 400 /** This filter is documented in wp-includes/category-template.php */ 400 401 $show_option_none = apply_filters( 'list_cats', $r['show_option_none'] ); 401 $selected = ( '-1' === strval($r['selected']) ) ? " selected='selected'" : '';402 $output .= "\t<option value=' -1'$selected>$show_option_none</option>\n";402 $selected = selected( $option_none_value, $r['selected'], false ); 403 $output .= "\t<option value='" . esc_attr( $option_none_value ) . "'$selected>$show_option_none</option>\n"; 403 404 } 404 405
Note: See TracChangeset
for help on using the changeset viewer.