WP_Query::the_comment() WordPress Method

The WP_Query::the_comment() method is used to print the current comment to the screen. This is useful when you want to display a list of comments from a post or page.

WP_Query::the_comment() #

Sets up the current comment.


Source

File: wp-includes/class-wp-query.php

	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' );
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
2.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.