On this page
WP_Query::the_comment()
Sets up the current comment.
Source
File: wp-includes/class-wp-query.php. View all references
public function the_comment() {
global $comment;
$comment = $this->next_comment();
if ( 0 == $this->current_comment ) {
/**
* Fires once the comment loop is started.
*
* @since 2.2.0
*/
do_action( 'comment_loop_start' );
}
}
Hooks
- do_action( 'comment_loop_start' )
-
Fires once the comment loop is started.
Related
Uses
| Uses | Description |
|---|---|
| WP_Query::next_comment() wp-includes/class-wp-query.php | Iterate current comment index and return WP_Comment object. |
| do_action() wp-includes/plugin.php | Calls the callback functions that have been added to an action hook. |
Used By
| Used By | Description |
|---|---|
| the_comment() wp-includes/query.php | Iterate comment index in the comment loop. |
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/the_comment