Changeset 38523 for trunk/src/wp-includes/class-walker-page.php
- Timestamp:
- 09/06/2016 09:05:45 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-page.php
r37518 r38523 54 54 */ 55 55 public function start_lvl( &$output, $depth = 0, $args = array() ) { 56 $indent = str_repeat("\t", $depth); 57 $output .= "\n$indent<ul class='children'>\n"; 56 if ( 'preserve' === $args['item_spacing'] ) { 57 $t = "\t"; 58 $n = "\n"; 59 } else { 60 $t = ''; 61 $n = ''; 62 } 63 $indent = str_repeat( $t, $depth ); 64 $output .= "{$n}{$indent}<ul class='children'>{$n}"; 58 65 } 59 66 … … 72 79 */ 73 80 public function end_lvl( &$output, $depth = 0, $args = array() ) { 74 $indent = str_repeat("\t", $depth); 75 $output .= "$indent</ul>\n"; 81 if ( 'preserve' === $args['item_spacing'] ) { 82 $t = "\t"; 83 $n = "\n"; 84 } else { 85 $t = ''; 86 $n = ''; 87 } 88 $indent = str_repeat( $t, $depth ); 89 $output .= "{$indent}</ul>{$n}"; 76 90 } 77 91 … … 90 104 */ 91 105 public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { 106 if ( 'preserve' === $args['item_spacing'] ) { 107 $t = "\t"; 108 $n = "\n"; 109 } else { 110 $t = ''; 111 $n = ''; 112 } 92 113 if ( $depth ) { 93 $indent = str_repeat( "\t", $depth );114 $indent = str_repeat( $t, $depth ); 94 115 } else { 95 116 $indent = ''; … … 176 197 */ 177 198 public function end_el( &$output, $page, $depth = 0, $args = array() ) { 178 $output .= "</li>\n"; 199 if ( 'preserve' === $args['item_spacing'] ) { 200 $t = "\t"; 201 $n = "\n"; 202 } else { 203 $t = ''; 204 $n = ''; 205 } 206 $output .= "</li>{$n}"; 179 207 } 180 208
Note: See TracChangeset
for help on using the changeset viewer.