Make WordPress Core

Changeset 48870


Ignore:
Timestamp:
08/27/2020 01:06:01 AM (4 years ago)
Author:
desrosj
Message:

Media: Disable lazy-loading for custom logos by default.

Custom site logos are most commonly displayed above the fold, so lazy-loading is unnecessary.

Props demetris, khag7, johnbillion, rebasaurus, audrasjb.
Fixes #50933.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r48832 r48870  
    10011001 * @since 4.5.0
    10021002 * @since 5.5.0 Added option to remove the link on the home page with `unlink-homepage-logo` theme support.
     1003 * @since 5.5.1 Disabled lazy-loading by default.
    10031004 *
    10041005 * @param int $blog_id Optional. ID of the blog in question. Default is the ID of the current blog.
     
    10191020    if ( $custom_logo_id ) {
    10201021        $custom_logo_attr = array(
    1021             'class' => 'custom-logo',
     1022            'class'   => 'custom-logo',
     1023            'loading' => false,
    10221024        );
    10231025
Note: See TracChangeset for help on using the changeset viewer.