Changeset 47122 for trunk/src/wp-includes/class-wp-walker.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-walker.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-walker.php
r46452 r47122 136 136 $id = $element->$id_field; 137 137 138 // display this element138 // Display this element. 139 139 $this->has_children = ! empty( $children_elements[ $id ] ); 140 140 if ( isset( $args[0] ) && is_array( $args[0] ) ) { … … 144 144 $this->start_el( $output, $element, $depth, ...array_values( $args ) ); 145 145 146 // descend only when the depth is right and there are childrens for this element146 // Descend only when the depth is right and there are childrens for this element. 147 147 if ( ( $max_depth == 0 || $max_depth > $depth + 1 ) && isset( $children_elements[ $id ] ) ) { 148 148 … … 151 151 if ( ! isset( $newlevel ) ) { 152 152 $newlevel = true; 153 // start the child delimiter153 // Start the child delimiter. 154 154 $this->start_lvl( $output, $depth, ...array_values( $args ) ); 155 155 } … … 160 160 161 161 if ( isset( $newlevel ) && $newlevel ) { 162 // end the child delimiter162 // End the child delimiter. 163 163 $this->end_lvl( $output, $depth, ...array_values( $args ) ); 164 164 } 165 165 166 // end this element166 // End this element. 167 167 $this->end_el( $output, $element, $depth, ...array_values( $args ) ); 168 168 } … … 189 189 $output = ''; 190 190 191 // invalid parameter or nothing to walk191 // Invalid parameter or nothing to walk. 192 192 if ( $max_depth < -1 || empty( $elements ) ) { 193 193 return $output; … … 196 196 $parent_field = $this->db_fields['parent']; 197 197 198 // flat display198 // Flat display. 199 199 if ( -1 == $max_depth ) { 200 200 $empty_array = array(); … … 296 296 } 297 297 if ( $page_num < 1 || $per_page < 0 ) { 298 // No paging 298 // No paging. 299 299 $paging = false; 300 300 $start = 0; … … 312 312 } 313 313 314 // flat display314 // Flat display. 315 315 if ( -1 == $max_depth ) { 316 316 if ( ! empty( $args[0]['reverse_top_level'] ) ) { … … 445 445 } 446 446 447 } // Walker447 }
Note: See TracChangeset
for help on using the changeset viewer.