Changeset 56065 for trunk/src/wp-includes/blocks/comments.php
- Timestamp:
- 06/27/2023 02:20:18 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/comments.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/comments.php
r55246 r56065 30 30 } 31 31 32 $comment_args = array(33 'post_id' => $post_id,34 'count' => true,35 'status' => 'approve',36 );37 32 // Return early if there are no comments and comments are closed. 38 if ( ! comments_open( $post_id ) && get_comments( $comment_args) === 0 ) {33 if ( ! comments_open( $post_id ) && (int) get_comments_number( $post_id ) === 0 ) { 39 34 return ''; 40 35 } … … 213 208 * the block has multiple styles. 214 209 */ 210 /** This filter is documented in wp-includes/blocks.php */ 215 211 $metadata = apply_filters( 'block_type_metadata', $metadata ); 216 212
Note: See TracChangeset
for help on using the changeset viewer.