Changeset 58466 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
- Timestamp:
- 06/24/2024 08:49:52 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
r58429 r58466 266 266 } 267 267 268 // Register theme-defined variations. 269 WP_Theme_JSON_Resolver::get_theme_data(); 270 271 // Register user-defined variations. 272 if ( ! empty( $config['styles']['blocks']['variations'] ) ) { 273 wp_register_block_style_variations_from_theme_json_data( $config['styles']['blocks']['variations'] ); 274 } 268 // Register theme-defined variations e.g. from block style variation partials under `/styles`. 269 $variations = WP_Theme_JSON_Resolver::get_style_variations( 'block' ); 270 wp_register_block_style_variations_from_theme_json_partials( $variations ); 275 271 276 272 if ( isset( $request['settings'] ) ) { … … 636 632 637 633 $response = array(); 634 635 // Register theme-defined variations e.g. from block style variation partials under `/styles`. 636 $partials = WP_Theme_JSON_Resolver::get_style_variations( 'block' ); 637 wp_register_block_style_variations_from_theme_json_partials( $partials ); 638 638 639 $variations = WP_Theme_JSON_Resolver::get_style_variations(); 639 640 640 foreach ( $variations as $variation ) { 641 641 $variation_theme_json = new WP_Theme_JSON( $variation );
Note: See TracChangeset
for help on using the changeset viewer.