- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-category-dropdown.php
r42201 r42343 36 36 * @see Walker::$db_fields 37 37 */ 38 public $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); 38 public $db_fields = array( 39 'parent' => 'parent', 40 'id' => 'term_id', 41 ); 39 42 40 43 /** … … 53 56 */ 54 57 public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { 55 $pad = str_repeat( ' ', $depth * 3);58 $pad = str_repeat( ' ', $depth * 3 ); 56 59 57 60 /** This filter is documented in wp-includes/category-template.php */ … … 64 67 } 65 68 66 $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . "\"";69 $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . '"'; 67 70 68 71 // Type-juggling causes false matches, so we force everything to a string. 69 if ( (string) $category->{$value_field} === (string) $args['selected'] ) 72 if ( (string) $category->{$value_field} === (string) $args['selected'] ) { 70 73 $output .= ' selected="selected"'; 74 } 71 75 $output .= '>'; 72 $output .= $pad.$cat_name; 73 if ( $args['show_count'] ) 74 $output .= ' ('. number_format_i18n( $category->count ) .')'; 76 $output .= $pad . $cat_name; 77 if ( $args['show_count'] ) { 78 $output .= ' (' . number_format_i18n( $category->count ) . ')'; 79 } 75 80 $output .= "</option>\n"; 76 81 }
Note: See TracChangeset
for help on using the changeset viewer.