On this page
WP_Query::next_comment(): WP_Comment
Iterate current comment index and return WP_Comment object.
Return
WP_Comment Comment object.
Source
File: wp-includes/class-wp-query.php. View all references
public function next_comment() {
$this->current_comment++;
/** @var WP_Comment */
$this->comment = $this->comments[ $this->current_comment ];
return $this->comment;
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Query::the_comment() wp-includes/class-wp-query.php | Sets up the current comment. |
Changelog
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_query/next_comment