Walker::start_lvl( string $output, int $depth, array $args = array() )
Starts the list before the elements are added.
Contents
Description
The $args parameter holds additional values that may be used with the child class methods. This method is called at the start of the output list.
Parameters
-
$output
string Required -
Used to append additional content (passed by reference).
-
$depth
int Required -
Depth of the item.
-
$args
array Optional -
An array of additional arguments.
Default:
array()
More Information
This method is abstract and should be explicitly defined in the child class, as needed. Also note that $output is passed by reference, so any changes made to the variable within the following methods are automatically handled (no return, echo, or print needed).
This method “Start Level” is run when the walker reaches the start of a new “branch” in the tree structure. Generally, this method is used to add the opening tag of a container HTML element (such as <ol>, <ul>, or <div>) to $output.
Source
File: wp-includes/class-wp-walker.php
.
View all references
public function start_lvl( &$output, $depth = 0, $args = array() ) {}
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
The start level refers to the start of a sub-level. Mening that the output does not effect the initial
wrapping around the whole navigation, but only the list of childerns children.