From 57fb66e52a58dbd48b39613e1d4bbec6872bffb6 Mon Sep 17 00:00:00 2001 From: yogeshbhutkar Date: Wed, 1 Jan 2025 12:31:15 +0530 Subject: [PATCH] PHP Tests: Fix inconsistent spacing between attributes --- packages/block-library/src/navigation-submenu/index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/navigation-submenu/index.php b/packages/block-library/src/navigation-submenu/index.php index 37e92cb07398a3..f74bcada3b1df4 100644 --- a/packages/block-library/src/navigation-submenu/index.php +++ b/packages/block-library/src/navigation-submenu/index.php @@ -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( '',