WP_Query::rewind_comments() WordPress Method
WP_Query::rewind_comments() is a method used in the WordPress class WP_Query. It is used to reset the comment index for the current query. This is useful for looping through comments multiple times.
WP_Query::rewind_comments() #
Rewind the comments, resets the comment index and comment to first.
Source
File: wp-includes/class-wp-query.php
public function rewind_comments() { $this->current_comment = -1; if ( $this->comment_count > 0 ) { $this->comment = $this->comments[0]; } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |