Walker_Page::start_lvl
Outputs the beginning of the current level in the tree before elements are output.
Method of the class: Walker_Page{}
No Hooks.
Returns
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
- See: Walker::start_lvl()
Changelog
| Since 2.1.0 | Introduced. |
Walker_Page::start_lvl() Walker Page::start lvl code WP 6.9.1
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}";
}