Walker_Page::start_lvl()publicWP 2.1.0

Outputs the beginning of the current level in the tree before elements are output.

Method of the class: Walker_Page{}

No Hooks.

Return

null. Nothing (null).

Usage

$Walker_Page = new Walker_Page();
$Walker_Page->start_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 next level.
Default: empty array

Notes

Changelog

Since 2.1.0 Introduced.

Walker_Page::start_lvl() code WP 6.4.3

public function start_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 .= "{$n}{$indent}<ul class='children'>{$n}";
}