From 42faee444e9f720d72a3349163893fe7e8167f08 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Tue, 25 May 2021 13:47:27 +0300 Subject: [PATCH] Backport fix from https://github.com/WordPress/wordpress-develop/pull/1275#discussion_r638665627 --- packages/block-library/src/site-logo/index.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/block-library/src/site-logo/index.php b/packages/block-library/src/site-logo/index.php index 1127f4790a3a7f..5e1a1a09eded10 100644 --- a/packages/block-library/src/site-logo/index.php +++ b/packages/block-library/src/site-logo/index.php @@ -22,8 +22,8 @@ function render_block_core_site_logo( $attributes ) { }; add_filter( 'wp_get_attachment_image_src', $adjust_width_height_filter ); - $custom_logo = get_custom_logo(); + remove_filter( 'wp_get_attachment_image_src', $adjust_width_height_filter ); if ( empty( $custom_logo ) ) { return ''; // Return early if no custom logo is set, avoiding extraneous wrapper div. @@ -56,7 +56,6 @@ function render_block_core_site_logo( $attributes ) { $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) ); $html = sprintf( '
%s
', $wrapper_attributes, $custom_logo ); - remove_filter( 'wp_get_attachment_image_src', $adjust_width_height_filter ); return $html; }