Make WordPress Core

Changeset 58244

Timestamp:
05/30/2024 04:38:26 AM (2 months ago)
Author:
isabel_brison
Message:

Editor: Add scoping of feature level global styles selectors.

Ensures that feature-level selectors for block style variations are correctly scoped when generating a theme.json stylesheet.

Props aaronrobertshaw, audrasjb, vcanales, isabel_brison.
Fixes #61119.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json.php

    r58242 r58244  
    12001200            }
    12011201            foreach ( $style_nodes as &$node ) {
    1202                 $node['selector'] = static::scope_selector( $options['scope'], $node['selector'] );
     1202                $node );
    12031203            }
    12041204            unset( $node );
     
    18241824        $result = implode( ', ', $selectors_scoped );
    18251825        return $result;
     1826
     1827
     1828
     1829
     1830
     1831
     1832
     1833
     1834
     1835
     1836
     1837
     1838
     1839
     1840
     1841
     1842
     1843
     1844
     1845
     1846
     1847
     1848
     1849
     1850
     1851
     1852
     1853
     1854
     1855
     1856
     1857
     1858
    18261859    }
    18271860
  • trunk/tests/phpunit/tests/theme/wpThemeJson.php

    r58241 r58244  
    55905590        );
    55915591    }
     5592
     5593
     5594
     5595
     5596
     5597
     5598
     5599
     5600
     5601
     5602
     5603
     5604
     5605
     5606
     5607
     5608
     5609
     5610
     5611
     5612
     5613
     5614
     5615
     5616
     5617
     5618
     5619
     5620
     5621
     5622
     5623
     5624
     5625
     5626
     5627
     5628
     5629
     5630
     5631
     5632
     5633
     5634
     5635
     5636
     5637
     5638
    55925639}
Note: See TracChangeset for help on using the changeset viewer.