WP_Query::next_comment(): WP_Comment

In this article

Iterates current comment index and returns WP_Comment object.

Return

WP_Comment Comment object.

Source

public function next_comment() {
	++$this->current_comment;

	/** @var WP_Comment */
	$this->comment = $this->comments[ $this->current_comment ];
	return $this->comment;
}

Changelog

VersionDescription
2.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.