$outer_class_names[] =
$container_content_class;
} // Return early if only child layout exists.
if ( !
$support_layout && !
empty( $outer_class_names ) ) { $content =
new WP_HTML_Tag_Processor( $block_content );
$content->
next_tag();
$content->
add_class( implode( ' ',
$outer_class_names ) );
return (string) $content;
} $global_settings =
wp_get_global_settings();
$fallback_layout = !
empty( _wp_array_get( $block_type->supports, array
( 'layout', 'default'
), array
() ) ) ?
_wp_array_get( $block_type->supports, array
( 'layout', 'default'
), array
() ) :
_wp_array_get( $block_type->supports, array
( '__experimentalLayout', 'default'
), array
() );
$used_layout =
isset( $block['attrs'
]['layout'
] ) ?
$block['attrs'
]['layout'
] :
$fallback_layout;
$class_names = array
();
$layout_definitions =
wp_get_layout_definitions();
$container_class =
wp_unique_id( 'wp-container-'
);
$layout_classname = '';
// Set the correct layout type for blocks using legacy content width.
if ( isset( $used_layout['inherit'
] ) &&
$used_layout['inherit'
] ||
isset( $used_layout['contentSize'
] ) &&
$used_layout['contentSize'
] ) { $used_layout['type'
] = 'constrained';
}