Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Sep 14, 2023
1 parent b4f007e commit ae1fcc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function gutenberg_register_layout_support( $block_type ) {
* @return string CSS styles on success. Else, empty string.
*/
function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support = false, $gap_value = null, $should_skip_gap_serialization = false, $fallback_gap_value = '0.5em', $block_spacing = null ) {
$layout_type = isset( $layout['type'] ) ? $layout['type'] : 'default';
$layout_type = $layout['type'] ?? 'default';
$layout_styles = array();

if ( 'default' === $layout_type ) {
Expand Down Expand Up @@ -403,7 +403,7 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support
foreach ( $gap_sides as $gap_side ) {
$process_value = $gap_value;
if ( is_array( $gap_value ) ) {
$gap_value = $gap_value[ $gap_side ] ?? $fallback_gap_value;
$process_value = $gap_value[ $gap_side ] ?? $fallback_gap_value;
}
// Get spacing CSS variable from preset value if provided.
if ( is_string( $process_value ) && str_contains( $process_value, 'var:preset|spacing|' ) ) {
Expand Down

0 comments on commit ae1fcc0

Please sign in to comment.