Skip to content

Commit

Permalink
Fix typo and remove core action
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Jun 11, 2024
1 parent 163be3d commit a90b811
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/block-supports/block-style-variations.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,4 +486,8 @@ function gutenberg_register_block_style_variations_from_theme() {
gutenberg_register_block_style_variations_from_theme_json_data( $variations_user );
}

add_filter( 'init', 'gutenberg_register_block_style_variations_from_theme' );
// Remove core init action registering variations.
if ( function_exists( 'wp_register_block_style_variations_from_theme' ) ) {
remove_action( 'init', 'wp_register_block_style_variations_from_theme' );
}
add_action( 'init', 'gutenberg_register_block_style_variations_from_theme' );

0 comments on commit a90b811

Please sign in to comment.