From 7da6f91a2366125d5946e435dbcfbf1e14ae8a9a Mon Sep 17 00:00:00 2001 From: Mapk Date: Fri, 22 Mar 2019 20:35:51 -0700 Subject: [PATCH] Fixed the Search block alignment issue. Also added ability for classname onto RSS block. --- packages/block-library/src/rss/index.php | 4 ++++ packages/block-library/src/search/index.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packages/block-library/src/rss/index.php b/packages/block-library/src/rss/index.php index dc25ac97780067..922db4c7aed759 100644 --- a/packages/block-library/src/rss/index.php +++ b/packages/block-library/src/rss/index.php @@ -92,6 +92,10 @@ function render_block_core_rss( $attributes ) { if ( isset( $attributes['columns'] ) && 'grid' === $attributes['blockLayout'] ) { $class .= ' columns-' . $attributes['columns']; } + + if ( isset( $attributes['className'] ) ) { + $class .= ' ' . $attributes['className']; + } $list_items_markup = ""; diff --git a/packages/block-library/src/search/index.php b/packages/block-library/src/search/index.php index 2589d360ef56c4..e7f4e3ef013bee 100644 --- a/packages/block-library/src/search/index.php +++ b/packages/block-library/src/search/index.php @@ -44,6 +44,10 @@ function render_block_core_search( $attributes ) { $class .= ' ' . $attributes['className']; } + if ( isset( $attributes['align'] ) ) { + $class .= ' align' . $attributes['align']; + } + return sprintf( '', $class,