Skip to content

Commit

Permalink
Update child layout selector to match core. (#61777)
Browse files Browse the repository at this point in the history
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
  • Loading branch information
3 people committed May 18, 2024
1 parent 6398d34 commit af5876a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion phpunit/block-supports/layout-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ public function data_layout_support_flag_renders_classnames_on_wrapper() {
),
),
),
'expected_output' => '<p class="wp-container-content-1">Some text.</p>', // The generated classname number assumes `wp_unique_id` will not have run previously in this test.
'expected_output' => '<p class="wp-container-content-1">Some text.</p>', // The generated classname number assumes `wp_unique_prefixed_id( 'wp-container-content-' )` will not have run previously in this test.
),
);
}
Expand Down

0 comments on commit af5876a

Please sign in to comment.