diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index aac62e402148a..dc5fe2e6a87da 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -577,7 +577,7 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { // Child layout specific logic. if ( $child_layout ) { - $container_content_class = wp_unique_id( 'wp-container-content-' ); + $container_content_class = wp_unique_prefixed_id( 'wp-container-content-' ); $child_layout_declarations = array(); $child_layout_styles = array(); diff --git a/phpunit/block-supports/layout-test.php b/phpunit/block-supports/layout-test.php index 6344d7617aeeb..dd40283171e5c 100644 --- a/phpunit/block-supports/layout-test.php +++ b/phpunit/block-supports/layout-test.php @@ -501,7 +501,7 @@ public function data_layout_support_flag_renders_classnames_on_wrapper() { ), ), ), - 'expected_output' => '

Some text.

', // The generated classname number assumes `wp_unique_id` will not have run previously in this test. + 'expected_output' => '

Some text.

', // The generated classname number assumes `wp_unique_prefixed_id( 'wp-container-content-' )` will not have run previously in this test. ), ); }