WordPress at a glance
function is not described

Walker_Comment::start_el() public WP 2.7.0

Starts the element output.

{} It's a method of the class: Walker_Comment{}

No Hooks.

Return

Null. Nothing.

Usage

$Walker_Comment = new Walker_Comment();
$Walker_Comment->start_el( $output, $comment, $depth, $args, $id );
$output(string) (required) (passed by reference — &)
Used to append additional content. Passed by reference.
$comment(WP_Comment) (required)
Comment data object.
$depth(int)
Depth of the current comment in reference to parents.
Default: 0
$args(array)
An array of arguments.
Default: empty array
$id(int)
ID of the current comment.
Default: 0 (unused)

Notes

  • See: Walker::start_el()
  • See: wp_list_comments()
  • Global. Int. $comment_depth
  • Global. WP_Comment. $comment Global comment object.

Changelog

Since 2.7.0 Introduced.

Code of Walker_Comment::start_el() WP 5.5.2

<?php
public function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) {
	$depth++;
	$GLOBALS['comment_depth'] = $depth;
	$GLOBALS['comment']       = $comment;

	if ( ! empty( $args['callback'] ) ) {
		ob_start();
		call_user_func( $args['callback'], $comment, $args, $depth );
		$output .= ob_get_clean();
		return;
	}

	if ( 'comment' === $comment->comment_type ) {
		add_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40, 2 );
	}

	if ( ( 'pingback' === $comment->comment_type || 'trackback' === $comment->comment_type ) && $args['short_ping'] ) {
		ob_start();
		$this->ping( $comment, $depth, $args );
		$output .= ob_get_clean();
	} elseif ( 'html5' === $args['format'] ) {
		ob_start();
		$this->html5_comment( $comment, $depth, $args );
		$output .= ob_get_clean();
	} else {
		ob_start();
		$this->comment( $comment, $depth, $args );
		$output .= ob_get_clean();
	}

	if ( 'comment' === $comment->comment_type ) {
		remove_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40, 2 );
	}
}