Twenty Twenty-One: Enable Dark Mode in the block editor iframe.

This changeset replaces `add_action( 'enqueue_block_editor_assets' )`, with `add_action( 'enqueue_block_assets' )`, in class `Twenty_Twenty_One_Dark_Mode` and class 
`Twenty_Twenty_One_Custom_Colors`. This fixes an issue when activating dark mode in Twenty Twenty-One, where dark mode was not enabled in the block editor.

Props poena, mikinc860, huzaifaalmesbah, hasanuzzamanshamim, Ankit-K-Gupta.
Fixes #58835.



Built from https://develop.svn.wordpress.org/trunk@56300


git-svn-id: http://core.svn.wordpress.org/trunk@55812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-07-25 12:31:21 +00:00
parent 1612d711dd
commit 577b07285e
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ class Twenty_Twenty_One_Custom_Colors {
add_action( 'wp_enqueue_scripts', array( $this, 'custom_color_variables' ) );
// Enqueue color variables for editor.
add_action( 'enqueue_block_editor_assets', array( $this, 'editor_custom_color_variables' ) );
add_action( 'enqueue_block_assets', array( $this, 'editor_custom_color_variables' ) );
// Add body-class if needed.
add_filter( 'body_class', array( $this, 'body_class' ) );

View File

@ -20,7 +20,7 @@ class Twenty_Twenty_One_Dark_Mode {
public function __construct() {
// Enqueue assets for the block-editor.
add_action( 'enqueue_block_editor_assets', array( $this, 'editor_custom_color_variables' ) );
add_action( 'enqueue_block_assets', array( $this, 'editor_custom_color_variables' ) );
// Add styles for dark-mode.
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56299';
$wp_version = '6.4-alpha-56300';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.