Make WordPress Core

Ticket #56930: 56930.diff

File 56930.diff, 728 bytes (added by adamsilverstein, 23 months ago)
  • src/wp-includes/media.php

    diff --git src/wp-includes/media.php src/wp-includes/media.php
    index bfd71cdcb3..2da31eaf1e 100644
    function wp_lazy_loading_enabled( $tag_name, $context ) { 
    17361736        // By default add to all 'img' and 'iframe' tags.
    17371737        // See https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading
    17381738        // See https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-loading
    1739         $default = ( 'img' === $tag_name || 'iframe' === $tag_name );
     1739        $default = false !== $context && ( 'img' === $tag_name || 'iframe' === $tag_name );
    17401740
    17411741        /**
    17421742         * Filters whether to add the `loading` attribute to the specified tag in the specified context.