Changeset 42343 for trunk/src/wp-includes/class-walker-page-dropdown.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-page-dropdown.php
r42201 r42343 36 36 * @todo Decouple this 37 37 */ 38 public $db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' ); 38 public $db_fields = array( 39 'parent' => 'post_parent', 40 'id' => 'ID', 41 ); 39 42 40 43 /** … … 55 58 */ 56 59 public function start_el( &$output, $page, $depth = 0, $args = array(), $id = 0 ) { 57 $pad = str_repeat( ' ', $depth * 3);60 $pad = str_repeat( ' ', $depth * 3 ); 58 61 59 62 if ( ! isset( $args['value_field'] ) || ! isset( $page->{$args['value_field']} ) ) { … … 61 64 } 62 65 63 $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $page->{$args['value_field']} ) . "\"";64 if ( $page->ID == $args['selected'] ) 66 $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $page->{$args['value_field']} ) . '"'; 67 if ( $page->ID == $args['selected'] ) { 65 68 $output .= ' selected="selected"'; 69 } 66 70 $output .= '>'; 67 71
Note: See TracChangeset
for help on using the changeset viewer.