Skip to content
Merged
Prev Previous commit
Next Next commit
PHPCS fixes
  • Loading branch information
ryanwelcher authored and aaronrobertshaw committed Nov 24, 2025
commit 55402fea4cffa4ab3ac725fe39d78d4c8a3ad08b
4 changes: 2 additions & 2 deletions lib/block-supports/dimensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function gutenberg_apply_dimensions_support( $block_type, $block_attributes ) {
function gutenberg_render_dimensions_support( $block_content, $block ) {
$block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] );
$block_attributes = ( isset( $block['attrs'] ) && is_array( $block['attrs'] ) ) ? $block['attrs'] : array();
$has_dimensions_support = block_has_support( $block_type, 'dimensions', false );
$has_dimensions_support = block_has_support( $block_type, 'dimensions', false );

if (
! $has_dimensions_support ||
Expand All @@ -111,7 +111,7 @@ function gutenberg_render_dimensions_support( $block_content, $block ) {
}

// Add width and height values.
$dimensions_block_styles['width'] = $block_attributes['style']['dimensions']['width'] ?? null;
$dimensions_block_styles['width'] = $block_attributes['style']['dimensions']['width'] ?? null;
$dimensions_block_styles['height'] = $block_attributes['style']['dimensions']['height'] ?? null;

$styles = gutenberg_style_engine_get_styles( array( 'dimensions' => $dimensions_block_styles ) );
Expand Down
4 changes: 2 additions & 2 deletions packages/style-engine/src/class-wp-style-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ final class WP_Style_Engine {
'spacing' => '--wp--preset--spacing--$slug',
),
),
'width' => array(
'width' => array(
'property_keys' => array(
'default' => 'width',
),
Expand All @@ -219,7 +219,7 @@ final class WP_Style_Engine {
'spacing' => '--wp--preset--spacing--$slug',
),
),
'height' => array(
'height' => array(
'property_keys' => array(
'default' => 'height',
),
Expand Down