Make WordPress Core


Ignore:
Timestamp:
01/16/2023 07:57:29 PM (4 years ago)
Author:
flixos90
Message:

Editor: Update packages to unblock lazy-loading issues.

Fixing the issue that featured images are always lazy-loaded in block themes required an upstream Gutenberg change ​https://github.com/WordPress/gutenberg/pull/45534. This changeset updates packages in order to unblock the remainder of the fix in trunk.

Props mamaduka.
See #56930.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/post-featured-image.php

    r54811 r55079  
    1919        }
    2020        $post_ID = $block->context['postId'];
     21
     22        // Check is needed for backward compatibility with third-party plugins
     23        // that might rely on the `in_the_loop` check; calling `the_post` sets it to true.
     24        if ( ! in_the_loop() && have_posts() ) {
     25                the_post();
     26        }
    2127
    2228        $is_link        = isset( $attributes['isLink'] ) && $attributes['isLink'];
Note: See TracChangeset for help on using the changeset viewer.