diff --git a/packages/block-library/src/comment-author-name/index.php b/packages/block-library/src/comment-author-name/index.php index 0bf3a475ba899e..f15e041b74a8f8 100644 --- a/packages/block-library/src/comment-author-name/index.php +++ b/packages/block-library/src/comment-author-name/index.php @@ -25,10 +25,7 @@ function render_block_core_comment_author_name( $attributes, $content, $block ) $classes = ''; if ( isset( $attributes['textAlign'] ) ) { - $classes .= 'has-text-align-' . esc_attr( $attributes['textAlign'] ); - } - if ( isset( $attributes['fontSize'] ) ) { - $classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size'; + $classes .= 'has-text-align-' . $attributes['textAlign']; } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); diff --git a/phpunit/class-block-library-comment-template-test.php b/phpunit/class-block-library-comment-template-test.php index 8099ed1f08cf61..f03a392d2b3ccb 100644 --- a/phpunit/class-block-library-comment-template-test.php +++ b/phpunit/class-block-library-comment-template-test.php @@ -138,7 +138,7 @@ function test_rendering_comment_template() { // Here we use the function prefixed with 'gutenberg_*' because it's added // in the build step. $this->assertEquals( - '