WordPress.org

Make WordPress Core

Changeset 48871


Ignore:
Timestamp:
08/27/2020 01:08:23 AM (3 months 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.
Merges [48870] to the 5.5 branch.
Fixes #50933.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-includes/general-template.php

    r48833 r48871  
    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.