WP_Theme_JSON8b7c:f320:99b9:690f:4595:cd17:293a:c069scope_selector( string $scope, string $selector ): string  Function that scopes a selector with another one. This works a bit like SCSS nesting except the &amp; operator isn’t supported.   Description $scope = '.a, .b .c';
$selector = '> .x, .y';
$merged = scope_selector( $scope, $selector );
// $merged is '.a > .x, .a .y, .b .c > .x, .b .c .y'   Parameters   $scope string Required    Selector to scope to.    $selector string Required    Original selector.      Return string Scoped selector.   Source  File: wp-includes/class-wp-theme-json.php. View all references  protected static function scope_selector( $scope, $selector ) {
	$scopes    = explode( ',', $scope );
	$selectors = explode( ',', $selector );

	$selectors_scoped = array();
	foreach ( $scopes as $outer ) {
		foreach ( $selectors as $inner ) {
			$selectors_scoped[] = trim( $outer ) . ' ' . trim( $inner );
		}
	}

	return implode( ', ', $selectors_scoped );
}
   Changelog    Version Description     5.9.0 Introduced.    

    
{'path': 'public/docs/wordpress/classes/wp_theme_json/scope_selector.html', 'source': 'DevDocs.IO'}