diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php
index 7e335fa49b..a45cb40509 100644
a
|
b
|
$editor_settings = get_block_editor_settings( $editor_settings, $block_editor_co |
265 | 265 | |
266 | 266 | $init_script = <<<JS |
267 | 267 | ( function() { |
268 | | window._wpLoadBlockEditor = new Promise( function( resolve ) { |
269 | | wp.domReady( function() { |
270 | | resolve( wp.editPost.initializeEditor( 'editor', "%s", %d, %s, %s ) ); |
271 | | } ); |
| 268 | wp.domReady( function() { |
| 269 | wp.editPost.initializeEditor( 'editor', "%s", %d, %s, %s ); |
272 | 270 | } ); |
273 | 271 | } )(); |
274 | 272 | JS; |
diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
index 718e18d1d5..7d5013e2a3 100644
a
|
b
|
function the_block_editor_meta_boxes() { |
2332 | 2332 | * admin_head fires after admin_enqueue_scripts, which is where we create our |
2333 | 2333 | * editor instance. |
2334 | 2334 | */ |
2335 | | $script = 'window._wpLoadBlockEditor.then( function() { |
2336 | | wp.data.dispatch( \'core/edit-post\' ).setAvailableMetaBoxesPerLocation( ' . wp_json_encode( $meta_boxes_per_location ) . ' ); |
2337 | | } );'; |
| 2335 | $script = ' wp.data.dispatch( \'core/edit-post\' ).setAvailableMetaBoxesPerLocation( ' . wp_json_encode( $meta_boxes_per_location ) . ' );'; |
2338 | 2336 | |
2339 | 2337 | wp_add_inline_script( 'wp-edit-post', $script ); |
2340 | 2338 | |