Walker_Page::end_lvl()
Outputs the end of the current level in the tree after elements are output.
Method of the class: Walker_Page{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Walker_Page = new Walker_Page(); $Walker_Page->end_lvl( $output, $depth, $args );
- $output(string) (required) (passed by reference — &)
- Used to append additional content (passed by reference).
- $depth(int)
- Depth of page. Used for padding.
- $args(array)
- Arguments for outputting the end of the current level.
Default: empty array
Notes
- See: Walker::end_lvl()
Changelog
Since 2.1.0 | Introduced. |
Walker_Page::end_lvl() Walker Page::end lvl code WP 6.7.1
public function end_lvl( &$output, $depth = 0, $args = array() ) { if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { $t = "\t"; $n = "\n"; } else { $t = ''; $n = ''; } $indent = str_repeat( $t, $depth ); $output .= "{$indent}</ul>{$n}"; }