Subir ajustes de acordeon y SEO
This commit is contained in:
@@ -3880,8 +3880,18 @@ class WP_Theme_JSON {
|
||||
// Only store if the variation has blockGap defined.
|
||||
if ( isset( $style_variation_node['spacing']['blockGap'] ) ) {
|
||||
// Append block selector to the variation selector for proper targeting.
|
||||
$variation_metadata_with_selector = $style_variation;
|
||||
$variation_metadata_with_selector['selector'] = $style_variation['selector'] . $block_metadata['css'];
|
||||
$variation_metadata_with_selector = $style_variation;
|
||||
$variation_metadata_with_selector['selector'] = $style_variation['selector'] . $block_metadata['css'];
|
||||
|
||||
/*
|
||||
* `get_layout_styles()` reads `name` as a block name, to check that the block
|
||||
* supports layout at all. A variation node's `name` is the variation slug,
|
||||
* which is never a registered block, so the check fails and every variation
|
||||
* gap rule is discarded. Pass the block the variation belongs to, so the
|
||||
* support check answers the question it is actually asking.
|
||||
*/
|
||||
$variation_metadata_with_selector['name'] = $block_name;
|
||||
|
||||
$style_variation_layout_metadata[ $style_variation['selector'] ] = array(
|
||||
'metadata' => $variation_metadata_with_selector,
|
||||
'node' => $style_variation_node,
|
||||
@@ -3937,7 +3947,11 @@ class WP_Theme_JSON {
|
||||
if ( isset( $breakpoint_node['spacing']['blockGap'] ) ) {
|
||||
$variation_layout_metadata = $style_variation;
|
||||
$variation_layout_metadata['selector'] = $style_variation['selector'] . $block_metadata['css'];
|
||||
$variation_responsive_css .= $this->get_layout_styles(
|
||||
|
||||
// The variation slug is not a block name here either. See above.
|
||||
$variation_layout_metadata['name'] = $block_name;
|
||||
|
||||
$variation_responsive_css .= $this->get_layout_styles(
|
||||
$variation_layout_metadata,
|
||||
array(
|
||||
'node' => $breakpoint_node,
|
||||
|
||||
Reference in New Issue
Block a user