wphooks.info - the_comments

the_comments

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/class-wp-comment-query.php:
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
		}

		/**
		 * Filters the comment query results.
		 *
		 * @since 3.1.0
		 *
		 * @param WP_Comment[]     $_comments An array of comments.
		 * @param WP_Comment_Query $this      Current instance of WP_Comment_Query (passed by reference).
		 */
		$_comments = apply_filters_ref_array( 'the_comments', array( $_comments, &$this ) );

		// Convert to WP_Comment instances
		$comments = array_map( 'get_comment', $_comments );

		if ( $this->query_vars['hierarchical'] ) {
			$comments = $this->fill_descendants( $comments );
		}

		$this->comments = $comments;