protected function get_layout_styles( $block_metadata ) { $block_rules = '';
$block_type = null;
// Skip outputting layout styles if explicitly disabled.
if ( current_theme_supports( 'disable-layout-styles'
) ) { return $block_rules;
} if ( isset( $block_metadata['name'
] ) ) { $block_type = WP_Block_Type_Registry::
get_instance()->
get_registered( $block_metadata['name'
] );
if ( !
block_has_support( $block_type, array
( 'layout'
), false
) && !
block_has_support( $block_type, array
( '__experimentalLayout'
), false
) ) { return $block_rules;
} } $selector =
isset( $block_metadata['selector'
] ) ?
$block_metadata['selector'
] : '';
$has_block_gap_support =
_wp_array_get( $this->theme_json, array
( 'settings', 'spacing', 'blockGap'
) ) !== null;
$has_fallback_gap_support = !
$has_block_gap_support; // This setting isn't useful yet: it exists as a placeholder for a future explicit fallback gap styles support.
$node =
_wp_array_get( $this->theme_json,
$block_metadata['path'
], array
() );
$layout_definitions =
wp_get_layout_definitions();
$layout_selector_pattern = '/^[a-zA-Z0-9\-\.\ *+>:\(\)]*$/'; // Allow alphanumeric classnames, spaces, wildcard, sibling, child combinator and pseudo class selectors.