Walker_Comment::start_lvl()

最后更新于:2021-11-26 06:29:20

Walker_Comment::start_lvl( string$output, int$depth, array$args=array())

Starts the list before the elements are added.

参数

$output

(string) (Required) Used to append additional content (passed by reference).

$depth

(int) (Optional) Depth of the current comment. Default 0.

$args

(array) (Optional) Uses ‘style’ argument for type of HTML list.

Default value: array()

源文件

文件: gc-includes/class-walker-comment.php

	public function start_lvl( &$output, $depth = 0, $args = array() ) {
		$GLOBALS['comment_depth'] = $depth + 1;

		switch ( $args['style'] ) {
			case 'div':
				break;
			case 'ol':
				$output .= '<ol class="children">' . "n";
				break;
			case 'ul':
			default:
				$output .= '<ul class="children">' . "n";
				break;
		}
	}