Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed May 26, 2021
1 parent ed26a23 commit 42faee4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/block-library/src/site-logo/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -56,7 +56,6 @@ function render_block_core_site_logo( $attributes ) {

$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) );
$html = sprintf( '<div %s>%s</div>', $wrapper_attributes, $custom_logo );
remove_filter( 'wp_get_attachment_image_src', $adjust_width_height_filter );
return $html;
}

Expand Down

0 comments on commit 42faee4

Please sign in to comment.