Making WordPress.org

Changeset 9630


Ignore:
Timestamp:
03/25/2020 05:59:27 AM (5 years ago)
Author:
coffee2code
Message:

Theme Directory: Lazy-load images.

Props jonoaldersonwp, coffee2code.
Fixes #5062.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/page-commercial.php

    r9211 r9630  
    4747                            <article id="post-<?php echo esc_attr( $shop->slug ); ?>" class="theme hentry">
    4848                                <div class="theme-screenshot">
    49                                     <img src="<?php echo esc_url( $shop->image ); ?>" alt="<?php
     49                                    <img src="<?php echo esc_url( $shop->image ); ?>" loading="lazy" alt="<?php
    5050                                        /* translators: %s: name of theme shop */
    5151                                        echo esc_attr( sprintf( __( '%s homepage', 'wporg-themes' ), $shop_name ) );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme.php

    r8998 r9630  
    33        <?php if ( $theme->screenshot_url ) { ?>
    44        <div class="theme-screenshot">
    5             <img src="<?php echo esc_url( $theme->screenshot_url ); ?>?w=572&amp;strip=all" alt="" />
     5            <img src="<?php echo esc_url( $theme->screenshot_url ); ?>?w=572&amp;strip=all" loading="lazy" alt="" />
    66        </div>
    77        <?php } else { ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-preview.php

    r8998 r9630  
    1414                <# } #>
    1515
    16                 <img class="theme-screenshot" src="{{ data.screenshot_url }}?w=520&strip=all" alt="" />
     16                <img class="theme-screenshot" src="{{ data.screenshot_url }}?w=520&strip=all" loading="lazy" alt="" />
    1717
    1818                <div class="theme-details">
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php

    r8998 r9630  
    33        <# if ( data.screenshot_url ) { #>
    44        <div class="theme-screenshot">
    5             <img src="{{ data.screenshot_url }}?w=572&strip=all" alt="" />
     5            <img src="{{ data.screenshot_url }}?w=572&strip=all" loading="lazy" alt="" />
    66        </div>
    77        <# } else { #>
Note: See TracChangeset for help on using the changeset viewer.