Skip to content

Commit

Permalink
PHP Tests: Fix inconsistent spacing between attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Jan 1, 2025
1 parent faf394e commit 57fb66e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/block-library/src/navigation-submenu/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,14 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
$html = $tag_processor->get_updated_html();
}

$wrapper_attributes = '';
$wrapper_attributes = array();
if ( ! empty( $style_attribute ) ) {
$wrapper_attributes .= sprintf( 'style="%s"', $style_attribute );
$wrapper_attributes[] = sprintf( 'style="%s"', $style_attribute );
}
if ( ! empty( $css_classes ) ) {
$wrapper_attributes .= sprintf( 'class="%s"', $css_classes );
$wrapper_attributes[] = sprintf( 'class="%s"', $css_classes );
}
$wrapper_attributes = implode( ' ', $wrapper_attributes );

$html .= sprintf(
'<ul %s>%s</ul>',
Expand Down

0 comments on commit 57fb66e

Please sign in to comment.