diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index d408600ef8501f..58d29c14e7c025 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -2473,26 +2473,6 @@ private static function get_block_nodes( $theme_json, $selectors = array() ) { } } - $variation_block_elements = $variation_block_node['elements'] ?? array(); - foreach ( $variation_block_elements as $variation_element => $variation_element_node ) { - $nodes[] = array( - 'path' => array( 'styles', 'blocks', $name, 'variations', $variation, 'blocks', $variation_block, 'elements', $variation_element ), - 'selector' => static::scope_selector( $variation_block_selector, static::ELEMENTS[ $variation_element ] ), - ); - - if ( isset( static::VALID_ELEMENT_PSEUDO_SELECTORS[ $variation_element ] ) ) { - foreach ( static::VALID_ELEMENT_PSEUDO_SELECTORS[ $variation_element ] as $pseudo_selector ) { - if ( isset( $variation_element_node[ $pseudo_selector ] ) ) { - $pseudo_element_selector = static::append_to_selector( static::ELEMENTS[ $variation_element ], $pseudo_selector ); - $nodes[] = array( - 'path' => array( 'styles', 'blocks', $name, 'variations', $variation, 'blocks', $variation_block, 'elements', $variation_element ), - 'selector' => static::scope_selector( $variation_block_selector, $pseudo_element_selector ), - ); - } - } - } - } - $variation_nodes[] = array( 'name' => $variation_block, 'path' => array( 'styles', 'blocks', $name, 'variations', $variation, 'blocks', $variation_block ),