Fix indentation and whitespace in WP_Theme_JSON and WP_Theme_JSON_Resolver

Props mukesh27.
Follows r58264.
See #61312.

Built from https://develop.svn.wordpress.org/trunk@58265


git-svn-id: http://core.svn.wordpress.org/trunk@57728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
noisysocks 2024-05-31 06:01:15 +00:00
parent 51c676d7ea
commit e2417763fa
3 changed files with 12 additions and 14 deletions

View File

@ -253,8 +253,8 @@ class WP_Theme_JSON_Resolver {
*
* @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data.
*/
$theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) );
static::$theme = $theme_json->get_theme_json();
$theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) );
static::$theme = $theme_json->get_theme_json();
if ( $wp_theme->parent() ) {
// Get parent theme.json.
@ -384,7 +384,7 @@ class WP_Theme_JSON_Resolver {
*
* @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data.
*/
$theme_json = apply_filters( 'wp_theme_json_data_blocks', new WP_Theme_JSON_Data( $config, 'blocks' ) );
$theme_json = apply_filters( 'wp_theme_json_data_blocks', new WP_Theme_JSON_Data( $config, 'blocks' ) );
static::$blocks = $theme_json->get_theme_json();
return static::$blocks;
}
@ -712,7 +712,6 @@ class WP_Theme_JSON_Resolver {
*
* @param array $variation Theme.json shaped style variation object.
* @param string $scope Scope to check e.g. theme, block etc.
*
* @return boolean
*/
private static function style_variation_has_scope( $variation, $scope ) {
@ -737,7 +736,6 @@ class WP_Theme_JSON_Resolver {
* can be applied e.g. theme vs block etc.
*
* @param string $scope The scope or type of style variation to retrieve e.g. theme, block etc.
*
* @return array
*/
public static function get_style_variations( $scope = 'theme' ) {

View File

@ -306,16 +306,16 @@ class WP_Theme_JSON {
* @var array
*/
const INDIRECT_PROPERTIES_METADATA = array(
'gap' => array(
'gap' => array(
array( 'spacing', 'blockGap' ),
),
'column-gap' => array(
'column-gap' => array(
array( 'spacing', 'blockGap', 'left' ),
),
'row-gap' => array(
'row-gap' => array(
array( 'spacing', 'blockGap', 'top' ),
),
'max-width' => array(
'max-width' => array(
array( 'layout', 'contentSize' ),
array( 'layout', 'wideSize' ),
),
@ -1222,10 +1222,10 @@ class WP_Theme_JSON {
* - `presets`: only the classes for the presets.
* @param string[] $origins A list of origins to include. By default it includes VALID_ORIGINS.
* @param array $options An array of options for now used for internal purposes only (may change without notice).
* The options currently supported are:
* - 'scope' that makes sure all style are scoped to a given selector
* - `root_selector` which overwrites and forces a given selector to be used on the root node
* - `skip_root_layout_styles` which omits root layout styles from the generated stylesheet.
* The options currently supported are:
* - 'scope' that makes sure all style are scoped to a given selector
* - `root_selector` which overwrites and forces a given selector to be used on the root node
* - `skip_root_layout_styles` which omits root layout styles from the generated stylesheet.
* @return string The resulting stylesheet.
*/
public function get_stylesheet( $types = array( 'variables', 'styles', 'presets' ), $origins = null, $options = array() ) {

View File

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