Make WordPress Core


Ignore:
Timestamp:
06/18/2024 07:07:52 AM (2 years ago)
Author:
oandregal
Message:

Do not use init to register block style variations defined via theme.json.

Props oandregal, aaronrobertshaw, joemcgill, ramonopoly, andrewserong, swissspidy.
See #61451.
Fixes #61312.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/block-supports/block-style-variations.php

    r58413 r58429  
    6767                switch_theme( 'block-theme' );
    6868
    69                 /*
    70                  * Trigger block style registration that occurs on `init` action.
    71                  * do_action( 'init' ) could be used here however this direct call
    72                  * means only the updates being tested are performed.
    73                  */
    74                 wp_register_block_style_variations_from_theme();
     69                // Register theme-defined variations.
     70                WP_Theme_JSON_Resolver::get_theme_data();
     71                // Register user-defined variations.
     72                WP_Theme_JSON_Resolver::get_user_data();
    7573
    7674                $variation_styles_data = array(
Note: See TracChangeset for help on using the changeset viewer.