WP_Query::next_comment()
Iterate current comment index and return WP_Comment object.
Method of the class: WP_Query{}
No Hooks.
Return
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.1.1
public function next_comment() { $this->current_comment++; /** @var WP_Comment */ $this->comment = $this->comments[ $this->current_comment ]; return $this->comment; }