From a861ce1b5f7425fd93bf1abacc39b35d229b49ef Mon Sep 17 00:00:00 2001 From: desrosj Date: Thu, 27 Aug 2020 01:07:11 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@48870 git-svn-id: http://core.svn.wordpress.org/trunk@48632 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 378e37fe3d..094e4a4062 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1000,6 +1000,7 @@ function has_custom_logo( $blog_id = 0 ) { * * @since 4.5.0 * @since 5.5.0 Added option to remove the link on the home page with `unlink-homepage-logo` theme support. + * @since 5.5.1 Disabled lazy-loading by default. * * @param int $blog_id Optional. ID of the blog in question. Default is the ID of the current blog. * @return string Custom logo markup. @@ -1018,7 +1019,8 @@ function get_custom_logo( $blog_id = 0 ) { // We have a logo. Logo is go. if ( $custom_logo_id ) { $custom_logo_attr = array( - 'class' => 'custom-logo', + 'class' => 'custom-logo', + 'loading' => false, ); $unlink_homepage_logo = (bool) get_theme_support( 'custom-logo', 'unlink-homepage-logo' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 6a1906250c..483278d7af 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48868'; +$wp_version = '5.6-alpha-48870'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.