attempt #2 at registering block style
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Aadil Ayub 2023-08-29 15:53:44 +05:00
parent 66c432457a
commit 496d3fd031

View File

@ -26,6 +26,6 @@ add_action( 'after_setup_theme', 'autonomic_block_styles' );
function autonomic_theme_scripts() { function autonomic_theme_scripts() {
// this is also for block styles // this is also for block styles
wp_enqueue_script( 'autonomic-block-styles', get_theme_file_uri( '/js/block-styles.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), true ); wp_enqueue_script( 'autonomic-block-styles', get_theme_file_uri( '/js/block-styles.js' ), array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ), filemtime( get_theme_file_uri( '/js/block-styles.js' ) ));
} }
add_action( 'wp_enqueue_scripts', 'autonomic_theme_scripts' ); add_action( 'enqueue_block_editor_assets', 'autonomic_theme_scripts' );