Skip to content

Commit

Permalink
Register variations from partials
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Jun 24, 2024
1 parent 556cab3 commit 270a4e5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,12 @@ public function get_theme_items( $request ) {
}

$response = array();
$variations = WP_Theme_JSON_Resolver::get_style_variations();

// Register theme-defined variations e.g. from block style variation partials under `/styles`.
$partials = WP_Theme_JSON_Resolver::get_style_variations( 'block' );
wp_register_block_style_variations_from_theme_json_partials( $partials );

$variations = WP_Theme_JSON_Resolver::get_style_variations();
foreach ( $variations as $variation ) {
$variation_theme_json = new WP_Theme_JSON( $variation );
$resolved_theme_uris = WP_Theme_JSON_Resolver::get_resolved_theme_uris( $variation_theme_json );
Expand Down

0 comments on commit 270a4e5

Please sign in to comment.