Skip to content

Commit

Permalink
A couple more removals that I previously missed
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Jun 13, 2023
1 parent ae7dfef commit fde9a8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,8 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) {
return (string) $content;
}

$global_settings = gutenberg_get_global_settings();
$global_layout_settings = _wp_array_get( $global_settings, array( 'layout' ), null );
$used_layout = isset( $block['attrs']['layout'] ) ? $block['attrs']['layout'] : _wp_array_get( $block_type->supports, array( '__experimentalLayout', 'default' ), array() );

if ( isset( $used_layout['inherit'] ) && $used_layout['inherit'] && ! $global_layout_settings ) {
return $block_content;
}
$global_settings = gutenberg_get_global_settings();
$used_layout = isset( $block['attrs']['layout'] ) ? $block['attrs']['layout'] : _wp_array_get( $block_type->supports, array( '__experimentalLayout', 'default' ), array() );

$class_names = array();
$layout_definitions = gutenberg_get_layout_definitions();
Expand Down
2 changes: 1 addition & 1 deletion lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ class WP_Theme_JSON_Gutenberg {
* @since 6.1.0 Added `layout.definitions` and `useRootPaddingAwareAlignments`.
* @since 6.2.0 Added `dimensions.minHeight`, 'shadow.presets', 'shadow.defaultPresets',
* `position.fixed` and `position.sticky`.
* @since 6.3.0 Removed `layout.definitions`.
* @var array
*/
const VALID_SETTINGS = array(
Expand Down Expand Up @@ -371,7 +372,6 @@ class WP_Theme_JSON_Gutenberg {
),
'layout' => array(
'contentSize' => null,
'definitions' => null,
'wideSize' => null,
),
'position' => array(
Expand Down

0 comments on commit fde9a8d

Please sign in to comment.