Changeset 38575
- Timestamp:
- 09/08/2016 07:05:32 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-nav-menu.php
r38559 r38575 51 51 */ 52 52 public function start_lvl( &$output, $depth = 0, $args = array() ) { 53 if ( 'preserve' === $args->item_spacing ) {54 $t = "\t";55 $n = "\n";56 } else { 57 $t = '';58 $n = '';53 if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { 54 $t = ''; 55 $n = ''; 56 } else { 57 $t = "\t"; 58 $n = "\n"; 59 59 } 60 60 $indent = str_repeat( $t, $depth ); … … 74 74 */ 75 75 public function end_lvl( &$output, $depth = 0, $args = array() ) { 76 if ( 'preserve' === $args->item_spacing ) {77 $t = "\t";78 $n = "\n";79 } else { 80 $t = '';81 $n = '';76 if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { 77 $t = ''; 78 $n = ''; 79 } else { 80 $t = "\t"; 81 $n = "\n"; 82 82 } 83 83 $indent = str_repeat( $t, $depth ); … … 100 100 */ 101 101 public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { 102 if ( 'preserve' === $args->item_spacing ) {103 $t = "\t";104 $n = "\n";105 } else { 106 $t = '';107 $n = '';102 if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { 103 $t = ''; 104 $n = ''; 105 } else { 106 $t = "\t"; 107 $n = "\n"; 108 108 } 109 109 $indent = ( $depth ) ? str_repeat( $t, $depth ) : ''; … … 238 238 */ 239 239 public function end_el( &$output, $item, $depth = 0, $args = array() ) { 240 if ( 'preserve' === $args->item_spacing ) {241 $t = "\t";242 $n = "\n";243 } else { 244 $t = '';245 $n = '';240 if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { 241 $t = ''; 242 $n = ''; 243 } else { 244 $t = "\t"; 245 $n = "\n"; 246 246 } 247 247 $output .= "</li>{$n}";
Note: See TracChangeset
for help on using the changeset viewer.