Skip to content

Commit

Permalink
Remove custom prefix from theme.json support property
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Aug 30, 2021
1 parent 36aceb3 commit 1bd0bf3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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 @@ -98,7 +98,7 @@ class WP_Theme_JSON_Gutenberg {
),
'custom' => null,
'dimensions' => array(
'customHeight' => null,
'height' => null,
),
'layout' => array(
'contentSize' => null,
Expand Down
2 changes: 1 addition & 1 deletion lib/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
]
},
"dimensions": {
"customHeight": false
"height": false
},
"spacing": {
"customMargin": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/height.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
Expand Down

0 comments on commit 1bd0bf3

Please sign in to comment.