Changeset 51346 for branches/5.8/src/wp-includes/blocks/post-content.php
- Timestamp:
- 07/06/2021 03:14:44 PM (4 years ago)
- Location:
- branches/5.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
-
branches/5.8/src/wp-includes/blocks/post-content.php
r50945 r51346 24 24 25 25 if ( isset( $seen_ids[ $post_id ] ) ) { 26 if ( ! is_admin() ) { 27 trigger_error( 28 sprintf( 29 // translators: %s is a post ID (integer). 30 __( 'Could not render Post Content block with post ID: <code>%s</code>. Block cannot be rendered inside itself.' ), 31 $post_id 32 ), 33 E_USER_WARNING 34 ); 35 } 36 26 // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent 27 // is set in `wp_debug_mode()`. 37 28 $is_debug = defined( 'WP_DEBUG' ) && WP_DEBUG && 38 29 defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY; 30 39 31 return $is_debug ? 40 32 // translators: Visible only in the front end, this warning takes the place of a faulty block. … … 45 37 $seen_ids[ $post_id ] = true; 46 38 47 if ( ! in_the_loop() ) {39 if ( ! in_the_loop() && have_posts() ) { 48 40 the_post(); 49 41 }
Note: See TracChangeset
for help on using the changeset viewer.