Editor: Update util for scoping CSS selectors.
Adds early return for existing scope_selector method in preparation for extending block style variations. Props aaronrobertshaw, audrasjb, isabel_brison. Fixes #61120. Built from https://develop.svn.wordpress.org/trunk@58245 git-svn-id: http://core.svn.wordpress.org/trunk@57708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6f9de6388c
commit
bfab5160b3
|
@ -1797,12 +1797,17 @@ class WP_Theme_JSON {
|
|||
* </code>
|
||||
*
|
||||
* @since 5.9.0
|
||||
* @since 6.6.0 Added early return if missing scope or selector.
|
||||
*
|
||||
* @param string $scope Selector to scope to.
|
||||
* @param string $selector Original selector.
|
||||
* @return string Scoped selector.
|
||||
*/
|
||||
public static function scope_selector( $scope, $selector ) {
|
||||
if ( ! $scope || ! $selector ) {
|
||||
return $selector;
|
||||
}
|
||||
|
||||
$scopes = explode( ',', $scope );
|
||||
$selectors = explode( ',', $selector );
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.6-alpha-58244';
|
||||
$wp_version = '6.6-alpha-58245';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue