mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Editor: Use the block editor context in filters that used the editor name
Follow-up for [50956]. Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad. Fixes #52920. git-svn-id: https://develop.svn.wordpress.org/trunk@50983 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -23,7 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
*/
|
||||
global $post_type, $post_type_object, $post, $title, $editor_styles, $wp_meta_boxes;
|
||||
|
||||
$editor_name = 'post-editor';
|
||||
$block_editor_context = new WP_Block_Editor_Context( array( 'post' => $post ) );
|
||||
|
||||
// Flag that we're loading the block editor.
|
||||
@@ -280,7 +279,7 @@ if ( ! isset( $core_meta_boxes['postcustom'] ) || ! $core_meta_boxes['postcustom
|
||||
unset( $editor_settings['enableCustomFields'] );
|
||||
}
|
||||
|
||||
$editor_settings = get_block_editor_settings( $editor_name, $editor_settings );
|
||||
$editor_settings = get_block_editor_settings( $editor_settings, $block_editor_context );
|
||||
|
||||
$init_script = <<<JS
|
||||
( function() {
|
||||
|
||||
Reference in New Issue
Block a user