diff --git a/docs/reference-guides/block-api/block-supports.md b/docs/reference-guides/block-api/block-supports.md index 7fade99f4095d..7fd0e68c9bd8c 100644 --- a/docs/reference-guides/block-api/block-supports.md +++ b/docs/reference-guides/block-api/block-supports.md @@ -556,7 +556,7 @@ supports: { - `allowVerticalAlignment`: type `boolean`, default value `true` - `allowJustification`: type `boolean`, default value `true` - `allowOrientation`: type `boolean`, default value `true` - - `allowCustomContentSize`: type `boolean`, default value `true` + - `allowCustomContentAndWideSize`: type `boolean`, default value `true` This value only applies to blocks that are containers for inner blocks. If set to `true` the layout type will be `flow`. For other layout types it's necessary to set the `type` explicitly inside the `default` object. @@ -616,7 +616,7 @@ For the `flex` layout type, determines display of the justification control in t For the `flex` layout type only, determines display of the orientation control in the block toolbar. -### layout.allowCustomContentSize +### layout.allowCustomContentAndWideSize - Type: `boolean` - Default value: `true` diff --git a/docs/reference-guides/theme-json-reference/theme-json-living.md b/docs/reference-guides/theme-json-reference/theme-json-living.md index cf290d5505a46..24a5845381bfd 100644 --- a/docs/reference-guides/theme-json-reference/theme-json-living.md +++ b/docs/reference-guides/theme-json-reference/theme-json-living.md @@ -129,7 +129,7 @@ Settings related to layout. | contentSize | string | | | | wideSize | string | | | | allowEditing | boolean | true | | -| allowCustomContentSize | boolean | true | | +| allowCustomContentAndWideSize | boolean | true | | --- diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index 192638f12abba..646c7abc59eaf 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -383,10 +383,10 @@ class WP_Theme_JSON_Gutenberg { 'minHeight' => null, ), 'layout' => array( - 'contentSize' => null, - 'wideSize' => null, - 'allowEditing' => null, - 'allowCustomContentSize' => null, + 'contentSize' => null, + 'wideSize' => null, + 'allowEditing' => null, + 'allowCustomContentAndWideSize' => null, ), 'lightbox' => array( 'enabled' => null, diff --git a/packages/block-editor/src/layouts/constrained.js b/packages/block-editor/src/layouts/constrained.js index 17983b2773c68..f86791391176f 100644 --- a/packages/block-editor/src/layouts/constrained.js +++ b/packages/block-editor/src/layouts/constrained.js @@ -36,8 +36,10 @@ export default { layoutBlockSupport = {}, } ) { const { wideSize, contentSize, justifyContent = 'center' } = layout; - const { allowJustification = true, allowCustomContentSize = true } = - layoutBlockSupport; + const { + allowJustification = true, + allowCustomContentAndWideSize = true, + } = layoutBlockSupport; const onJustificationChange = ( value ) => { onChange( { ...layout, @@ -67,7 +69,7 @@ export default { } ); return ( <> - { allowCustomContentSize && ( + { allowCustomContentAndWideSize && ( <>