Commit 12f915a5 authored by Jonathan Desrosiers's avatar Jonathan Desrosiers
Browse files

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.
Built from https://develop.svn.wordpress.org/branches/5.5@48871


git-svn-id: https://core.svn.wordpress.org/branches/5.5@48633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 6ce0801e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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.
@@ -1019,6 +1020,7 @@ function get_custom_logo( $blog_id = 0 ) {
	if ( $custom_logo_id ) {
		$custom_logo_attr = array(
			'class'   => 'custom-logo',
			'loading' => false,
		);

		$unlink_homepage_logo = (bool) get_theme_support( 'custom-logo', 'unlink-homepage-logo' );
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
 *
 * @global string $wp_version
 */
$wp_version = '5.5.1-alpha-48869';
$wp_version = '5.5.1-alpha-48871';

/**
 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.