From bf2c299e206dda41a7839c65d95c301105ce647a Mon Sep 17 00:00:00 2001 From: JC Date: Thu, 20 Jun 2024 02:24:16 +0800 Subject: [PATCH] WDSBT-20 - Replace enqueue_block_editor_assets with enqueue_block_assets to get styles and scripts for both frontend and backend --- inc/hooks/register-block-variations.php | 2 +- inc/hooks/unregister-block-variations.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/hooks/register-block-variations.php b/inc/hooks/register-block-variations.php index 438ac70..13df09e 100644 --- a/inc/hooks/register-block-variations.php +++ b/inc/hooks/register-block-variations.php @@ -20,4 +20,4 @@ function register_block_variations() { ); } -add_filter( 'enqueue_block_editor_assets', __NAMESPACE__ . '\register_block_variations', 10, 1 ); +add_filter( 'enqueue_block_assets', __NAMESPACE__ . '\register_block_variations', 10, 1 ); diff --git a/inc/hooks/unregister-block-variations.php b/inc/hooks/unregister-block-variations.php index c0164e3..890377d 100644 --- a/inc/hooks/unregister-block-variations.php +++ b/inc/hooks/unregister-block-variations.php @@ -21,4 +21,4 @@ function remove_core_blocks_gutenberg_editor() { true ); } -add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\remove_core_blocks_gutenberg_editor' ); +add_action( 'enqueue_block_assets', __NAMESPACE__ . '\remove_core_blocks_gutenberg_editor' );