comments_array

comments_array

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.6.2

apply_filters('comments_array') is found 1 times:

  • /wp-includes/comment-template.php line 1587
    	 *
    	 * @param array $comments Array of comments supplied to the comments template.
    	 * @param int   $post_id  Post ID.
    	 */
    	$wp_query->comments = apply_filters( 'comments_array', $comments_flat, $post->ID );
    
    	$comments                        = &$wp_query->comments;
    	$wp_query->comment_count         = count( $wp_query->comments );
    	$wp_query->max_num_comment_pages = $comment_query->max_num_pages;
    
    	if ( $separate_comments ) {
    

See this hook used in plugins:

Examples using comments_array