Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove custom prefix from theme.json support property
  • Loading branch information
aaronrobertshaw committed Aug 30, 2021
commit 1bd0bf38612deccb4b2467bf03d89f074437fcd9
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