Skip to content

Commit

Permalink
Make sure styles are loaded into the full-site editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellr committed Jun 23, 2020
1 parent 523f12d commit a15c1b3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions twentytwenty-blocks/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit a15c1b3

Please sign in to comment.