From a15c1b37a67dd3564c20751530021b1d52cbcf10 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 23 Jun 2020 10:00:37 -0400 Subject: [PATCH] Make sure styles are loaded into the full-site editor. --- twentytwenty-blocks/functions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/twentytwenty-blocks/functions.php b/twentytwenty-blocks/functions.php index 7c32c877..b22cee0d 100644 --- a/twentytwenty-blocks/functions.php +++ b/twentytwenty-blocks/functions.php @@ -298,6 +298,17 @@ function twentytwentyblocks_register_styles() { } add_action( 'wp_enqueue_scripts', 'twentytwentyblocks_register_styles' ); +/** + * Load styles into Edit Site + * (This shouldn't be necessary but it seems to be for now.) + */ +function twentytwentyblocks_register_FSE_styles() { + $theme_version = wp_get_theme()->get( 'Version' ); + wp_register_style( 'custom_wp_admin_css', get_template_directory_uri() . '/twentytwenty-styles/editor-style-block.css', false, $theme_version ); + wp_enqueue_style( 'custom_wp_admin_css' ); +} +add_action( 'admin_enqueue_scripts', 'twentytwentyblocks_register_FSE_styles' ); + /** * Register Block Patterns. */