stage style.css on editor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Aadil Ayub 2024-09-11 15:40:59 +05:00
parent 34d3baed02
commit c9d7f6a137

View File

@ -10,10 +10,10 @@ function custom_stylesheet() {
* TODO: unify both css files into one stylesheet
*/
wp_register_style( 'block-styles', get_theme_file_uri( 'block-styles.css' ) );
wp_enqueue_style( 'custom-styles' );
wp_enqueue_style( 'block-styles' );
}
wp_enqueue_style( 'custom-styles' );
wp_enqueue_style( 'block-styles' );
add_action( 'after_setup_theme', 'autonomic_block_styles');
function autonomic_block_styles() {
/**
@ -26,6 +26,12 @@ function autonomic_block_styles() {
}
add_action( 'after_setup_theme', 'autonomic_block_styles' );
// stage style.css on editor
function enqueue_editor_styles() {
wp_enqueue_style( 'editor-styles', get_template_directory_uri() . '/editor-style.css' );
}
add_action( 'enqueue_block_editor_assets', 'enqueue_editor_styles' );
function autonomic_theme_scripts() {
// 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-ready', 'wp-edit-post' ), filemtime( get_theme_file_uri( '/js/block-styles.js' ) ));