diff --git a/wp-content/themes/twentytwenty/functions.php b/wp-content/themes/twentytwenty/functions.php index d05df26a2b..55cb7988c1 100644 --- a/wp-content/themes/twentytwenty/functions.php +++ b/wp-content/themes/twentytwenty/functions.php @@ -416,6 +416,7 @@ add_action( 'widgets_init', 'twentytwenty_sidebar_registration' ); * Enqueue supplemental block editor styles. * * @since Twenty Twenty 1.0 + * @since Twenty Twenty 2.4 Removed a script related to the obsolete Squared style of Button blocks. */ function twentytwenty_block_editor_styles() { @@ -434,12 +435,13 @@ function twentytwenty_block_editor_styles() { if ( $custom_css ) { wp_add_inline_style( 'twentytwenty-block-editor-styles', $custom_css ); } - - // Enqueue the editor script. - wp_enqueue_script( 'twentytwenty-block-editor-script', get_theme_file_uri( '/assets/js/editor-script-block.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), array( 'in_footer' => true ) ); } -add_action( 'enqueue_block_editor_assets', 'twentytwenty_block_editor_styles', 1, 1 ); +if ( is_admin() && version_compare( $GLOBALS['wp_version'], '6.3', '>=' ) ) { + add_action( 'enqueue_block_assets', 'twentytwenty_block_editor_styles', 1, 1 ); +} else { + add_action( 'enqueue_block_editor_assets', 'twentytwenty_block_editor_styles', 1, 1 ); +} /** * Enqueue classic editor styles. diff --git a/wp-content/themes/twentytwenty/inc/custom-css.php b/wp-content/themes/twentytwenty/inc/custom-css.php index e551eb6abc..afc1449b60 100644 --- a/wp-content/themes/twentytwenty/inc/custom-css.php +++ b/wp-content/themes/twentytwenty/inc/custom-css.php @@ -144,7 +144,7 @@ if ( ! function_exists( 'twentytwenty_get_customizer_css' ) ) { // Text color. if ( $body && $body !== $body_default ) { - twentytwenty_generate_css( 'body .editor-styles-wrapper, .editor-post-title__block .editor-post-title__input, .editor-post-title__block .editor-post-title__input:focus', 'color', $body ); + twentytwenty_generate_css( 'html .editor-styles-wrapper, .editor-post-title__block .editor-post-title__input, .editor-post-title__block .editor-post-title__input:focus', 'color', $body ); } // Secondary color. diff --git a/wp-includes/version.php b/wp-includes/version.php index 26e2817aa5..bbdff51fc5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-beta2-56780'; +$wp_version = '6.4-beta2-56783'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.