WP_Query::rewind_comments()publicWP 2.2.0

Rewinds the comments, resets the comment index and comment to first.

Method of the class: WP_Query{}

No Hooks.

Return

null. Nothing (null).

Usage

global $wp_query;
$wp_query->rewind_comments();

Changelog

Since 2.2.0 Introduced.

WP_Query::rewind_comments() code WP 6.5.2

public function rewind_comments() {
	$this->current_comment = -1;
	if ( $this->comment_count > 0 ) {
		$this->comment = $this->comments[0];
	}
}