From 51bd3e7900924aa36d42c9a456e815986f0bcd2c Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Thu, 9 Feb 2023 10:52:50 +0000 Subject: [PATCH] Fix: Issues on block level settings (#47842) --- lib/block-supports/settings.php | 2 +- lib/class-wp-theme-json-gutenberg.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/block-supports/settings.php b/lib/block-supports/settings.php index 89b47f2e9a062b..0e34c32a8b111a 100644 --- a/lib/block-supports/settings.php +++ b/lib/block-supports/settings.php @@ -92,7 +92,7 @@ function _gutenberg_add_block_level_preset_styles( $pre_render, $block ) { $variables_root_selector .= ',' . $block_type->supports['__experimentalSelector']; } } - $variables_root_selector = WP_Theme_JSON_6_1::scope_selector( $class_name, $variables_root_selector ); + $variables_root_selector = WP_Theme_JSON_Gutenberg::scope_selector( $class_name, $variables_root_selector ); // Remove any potentially unsafe styles. $theme_json_shape = WP_Theme_JSON_Gutenberg::remove_insecure_properties( diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index 277a967c208242..02ace2860990e1 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -1551,7 +1551,7 @@ protected static function compute_preset_classes( $settings, $selector, $origins * @param string $selector Original selector. * @return string Scoped selector. */ - protected static function scope_selector( $scope, $selector ) { + public static function scope_selector( $scope, $selector ) { $scopes = explode( ',', $scope ); $selectors = explode( ',', $selector );