1
0
mirror of https://github.com/WordPress/WordPress.git synced 2025-03-10 05:39:05 +01:00

Editor: Fix Theme.json application of custom root selector for styles.

Theme.json stylesheets attempting to use a custom root selector are generated with in correct styles.

Props aaronrobertshaw, get_dave, mukesh27.
Fixes .
Built from https://develop.svn.wordpress.org/trunk@57352


git-svn-id: http://core.svn.wordpress.org/trunk@56858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
youknowriad 2024-01-25 10:43:12 +00:00
parent eafafcf518
commit 02cdd7f047
2 changed files with 3 additions and 3 deletions

View File

@ -935,7 +935,7 @@ class WP_Theme_JSON {
if ( $duotone_support ) { if ( $duotone_support ) {
$root_selector = wp_get_block_css_selector( $block_type ); $root_selector = wp_get_block_css_selector( $block_type );
$duotone_selector = WP_Theme_JSON::scope_selector( $root_selector, $duotone_support ); $duotone_selector = static::scope_selector( $root_selector, $duotone_support );
} }
} }
@ -1078,7 +1078,7 @@ class WP_Theme_JSON {
$setting_nodes[ $root_settings_key ]['selector'] = $options['root_selector']; $setting_nodes[ $root_settings_key ]['selector'] = $options['root_selector'];
} }
if ( false !== $root_style_key ) { if ( false !== $root_style_key ) {
$setting_nodes[ $root_style_key ]['selector'] = $options['root_selector']; $style_nodes[ $root_style_key ]['selector'] = $options['root_selector'];
} }
} }

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.5-alpha-57351'; $wp_version = '6.5-alpha-57352';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.