Changeset 58185
- Timestamp:
- 05/23/2024 04:12:31 PM (5 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json-data.php
r56547 r58185 70 70 return $this->theme_json->get_raw_data(); 71 71 } 72 73 /** 74 * Returns theme JSON object. 75 * 76 * @since 6.6.0 77 * 78 * @return WP_Theme_JSON The theme JSON structure stored in this data object. 79 */ 80 public function get_theme_json() { 81 return $this->theme_json; 82 } 72 83 } -
trunk/src/wp-includes/class-wp-theme-json-resolver.php
r57885 r58185 174 174 */ 175 175 $theme_json = apply_filters( 'wp_theme_json_data_default', new WP_Theme_JSON_Data( $config, 'default' ) ); 176 $config = $theme_json->get_data(); 177 static::$core = new WP_Theme_JSON( $config, 'default' ); 176 static::$core = $theme_json->get_theme_json(); 178 177 179 178 return static::$core; … … 256 255 */ 257 256 $theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) ); 258 $theme_json_data = $theme_json->get_data(); 259 static::$theme = new WP_Theme_JSON( $theme_json_data ); 257 static::$theme = $theme_json->get_theme_json(); 260 258 261 259 if ( $wp_theme->parent() ) { … … 388 386 */ 389 387 $theme_json = apply_filters( 'wp_theme_json_data_blocks', new WP_Theme_JSON_Data( $config, 'blocks' ) ); 390 $config = $theme_json->get_data(); 391 392 static::$blocks = new WP_Theme_JSON( $config, 'blocks' ); 388 static::$blocks = $theme_json->get_theme_json(); 393 389 return static::$blocks; 394 390 } … … 524 520 */ 525 521 $theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data( $config, 'custom' ) ); 526 $config = $theme_json->get_data(); 527 return new WP_Theme_JSON( $config, 'custom' ); 522 return $theme_json->get_theme_json(); 528 523 } 529 524 … … 544 539 /** This filter is documented in wp-includes/class-wp-theme-json-resolver.php */ 545 540 $theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data( $config, 'custom' ) ); 546 $config = $theme_json->get_data(); 547 static::$user = new WP_Theme_JSON( $config, 'custom' ); 541 static::$user = $theme_json->get_theme_json(); 548 542 549 543 return static::$user;
Note: See TracChangeset
for help on using the changeset viewer.