diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index 07e8251e4288e3..a03f940fa7f8fe 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -98,7 +98,7 @@ class WP_Theme_JSON_Gutenberg { ), 'custom' => null, 'dimensions' => array( - 'customHeight' => null, + 'height' => null, ), 'layout' => array( 'contentSize' => null, diff --git a/lib/theme.json b/lib/theme.json index 3a0689f0c8693c..7f218f855dfeb2 100644 --- a/lib/theme.json +++ b/lib/theme.json @@ -211,7 +211,7 @@ ] }, "dimensions": { - "customHeight": false + "height": false }, "spacing": { "customMargin": false, diff --git a/packages/block-editor/src/hooks/height.js b/packages/block-editor/src/hooks/height.js index 00e80e30850f4f..a2c80bc4eea9b9 100644 --- a/packages/block-editor/src/hooks/height.js +++ b/packages/block-editor/src/hooks/height.js @@ -66,7 +66,7 @@ export function resetHeight( { attributes = {}, setAttributes } ) { * @return {boolean} Whether height control is disabled. */ export function useIsHeightDisabled( { name: blockName } = {} ) { - const isDisabled = ! useSetting( 'dimensions.customHeight' ); + const isDisabled = ! useSetting( 'dimensions.height' ); return ! hasHeightSupport( blockName ) || isDisabled; } diff --git a/packages/edit-site/src/components/sidebar/dimensions-panel.js b/packages/edit-site/src/components/sidebar/dimensions-panel.js index 7be29ad66d58ed..fd878c0fcae39a 100644 --- a/packages/edit-site/src/components/sidebar/dimensions-panel.js +++ b/packages/edit-site/src/components/sidebar/dimensions-panel.js @@ -27,7 +27,7 @@ export function useHasDimensionsPanel( context ) { } function useHasHeight( { name, supports } ) { - const settings = useSetting( 'dimensions.customHeight', name ); + const settings = useSetting( 'dimensions.height', name ); return settings && supports.includes( 'height' ); }