Site Editor: Pass correct context into get_block_categories
Site Editor passed incorrectly global $post as a context when setting up block categories. Instead, it should pass $block_editor_context, since global $post is null in this file. Props Mamaduka. Fixes #56284. Built from https://develop.svn.wordpress.org/trunk@53784 git-svn-id: http://core.svn.wordpress.org/trunk@53343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7af37ed1ad
commit
db37be017f
|
@ -6,7 +6,7 @@
|
|||
* @subpackage Administration
|
||||
*/
|
||||
|
||||
global $post, $editor_styles;
|
||||
global $editor_styles;
|
||||
|
||||
/** WordPress Administration Bootstrap */
|
||||
require_once __DIR__ . '/admin.php';
|
||||
|
@ -120,7 +120,7 @@ wp_add_inline_script(
|
|||
|
||||
wp_add_inline_script(
|
||||
'wp-blocks',
|
||||
sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $post ) ) ),
|
||||
sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( isset( $editor_settings['blockCategories'] ) ? $editor_settings['blockCategories'] : array() ) ),
|
||||
'after'
|
||||
);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-alpha-53783';
|
||||
$wp_version = '6.1-alpha-53784';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue