Match Gutenberg editor styling to the frontend canvas
This commit is contained in:
@@ -10,6 +10,8 @@ function c1024_2026_setup() {
|
||||
add_theme_support( 'custom-logo', array( 'flex-width' => true, 'flex-height' => true ) );
|
||||
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script' ) );
|
||||
add_theme_support( 'align-wide' );
|
||||
add_theme_support( 'editor-styles' );
|
||||
// Classic-editor stylesheet; the same file is explicitly enqueued for the block editor below.
|
||||
add_editor_style( 'editor-style.css' );
|
||||
register_nav_menus( array(
|
||||
'primary' => __( 'Primary menu', 'c1024-2026' ),
|
||||
@@ -26,6 +28,12 @@ function c1024_2026_assets() {
|
||||
// Load public assets through WordPress so dependencies and plugin integrations remain ordered.
|
||||
add_action( 'wp_enqueue_scripts', 'c1024_2026_assets' );
|
||||
|
||||
function c1024_2026_block_editor_assets() {
|
||||
// Load the complete canvas stylesheet inside Gutenberg's editor iframe.
|
||||
wp_enqueue_style( 'c1024-2026-editor-style', get_theme_file_uri( '/editor-style.css' ), array(), '1.0.0' );
|
||||
}
|
||||
add_action( 'enqueue_block_editor_assets', 'c1024_2026_block_editor_assets' );
|
||||
|
||||
// These settings drive the optional front-page hero without hard-coding media or copy.
|
||||
function c1024_2026_customize_register( $wp_customize ) {
|
||||
$wp_customize->add_section( 'c1024_2026_home_hero', array(
|
||||
|
||||
Reference in New Issue
Block a user