From e521cc58c77cf61190dc2c756b73214168e09a12 Mon Sep 17 00:00:00 2001 From: shimotmk Date: Sat, 26 Mar 2022 10:46:32 +0900 Subject: [PATCH] Fix className --- packages/block-library/src/site-logo/index.php | 4 ---- packages/block-library/src/social-link/index.php | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/block-library/src/site-logo/index.php b/packages/block-library/src/site-logo/index.php index 7ad9f4d17ca77..35e199d59ded0 100644 --- a/packages/block-library/src/site-logo/index.php +++ b/packages/block-library/src/site-logo/index.php @@ -44,10 +44,6 @@ function render_block_core_site_logo( $attributes ) { } $classnames = array(); - if ( ! empty( $attributes['className'] ) ) { - $classnames[] = $attributes['className']; - } - if ( empty( $attributes['width'] ) ) { $classnames[] = 'is-default-size'; } diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index c34db33274085..488b91b02c27d 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -21,7 +21,6 @@ function render_block_core_social_link( $attributes, $content, $block ) { $url = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false; $label = ( isset( $attributes['label'] ) ) ? $attributes['label'] : block_core_social_link_get_name( $service ); $show_labels = array_key_exists( 'showLabels', $block->context ) ? $block->context['showLabels'] : false; - $class_name = isset( $attributes['className'] ) ? ' ' . $attributes['className'] : false; // Don't render a link if there is no URL set. if ( ! $url ) { @@ -36,7 +35,7 @@ function render_block_core_social_link( $attributes, $content, $block ) { $icon = block_core_social_link_get_icon( $service ); $wrapper_attributes = get_block_wrapper_attributes( array( - 'class' => 'wp-social-link wp-social-link-' . $service . $class_name, + 'class' => 'wp-social-link wp-social-link-' . $service, 'style' => block_core_social_link_get_color_styles( $block->context ), ) );