WP_Query::next_comment
Iterates current comment index and returns WP_Comment object.
Method of the class: WP_Query{}
No Hooks.
Returns
WP_Comment. Comment object.
Usage
global $wp_query; $wp_query->next_comment();
Changelog
| Since 2.2.0 | Introduced. |
WP_Query::next_comment() WP Query::next comment code WP 6.9
public function next_comment() {
++$this->current_comment;
/** @var WP_Comment */
$this->comment = $this->comments[ $this->current_comment ];
return $this->comment;
}