Walker_Page::start_lvl()publicWP 2.1.0

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

Метод класса: Walker_Page{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Walker_Page = new Walker_Page();
$Walker_Page->start_lvl( $output, $depth, $args );
$output(строка) (обязательный) (передается по ссылке — &)
Used to append additional content (passed by reference).
$depth(int)
Depth of page. Used for padding.
$args(массив)
Arguments for outputting the next level.
По умолчанию: empty array

Заметки

Список изменений

С версии 2.1.0 Введена.

Код Walker_Page::start_lvl() WP 6.5.2

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}";
}