Skip to content

Commit

Permalink
Fixed the Search block alignment issue. Also added ability for classn…
Browse files Browse the repository at this point in the history
…ame onto RSS block.
  • Loading branch information
mapk authored and gziolo committed Mar 25, 2019
1 parent 6ea4f56 commit 7da6f91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/block-library/src/rss/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<ul class='{$class}'>{$list_items}</ul>";

Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/search/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ function render_block_core_search( $attributes ) {
$class .= ' ' . $attributes['className'];
}

if ( isset( $attributes['align'] ) ) {
$class .= ' align' . $attributes['align'];
}

return sprintf(
'<form class="%s" role="search" method="get" action="%s">%s</form>',
$class,
Expand Down

0 comments on commit 7da6f91

Please sign in to comment.