mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 23:57:41 +02:00
Site Editor: Render the template descriptions properly.
The initializaion of the editor was a bit different between Gutenberg and Core. This brings them in sync which solves the missing descriptions from the template header in the site editor. See #54337. Built from https://develop.svn.wordpress.org/trunk@52336 git-svn-id: http://core.svn.wordpress.org/trunk@51928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ef4271cfee
commit
ec25c4ee57
@ -37,12 +37,18 @@ add_filter(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$indexed_template_types = array();
|
||||||
|
foreach ( get_default_block_template_types() as $slug => $template_type ) {
|
||||||
|
$template_type['slug'] = (string) $slug;
|
||||||
|
$indexed_template_types[] = $template_type;
|
||||||
|
}
|
||||||
|
|
||||||
$block_editor_context = new WP_Block_Editor_Context();
|
$block_editor_context = new WP_Block_Editor_Context();
|
||||||
$custom_settings = array(
|
$custom_settings = array(
|
||||||
'siteUrl' => site_url(),
|
'siteUrl' => site_url(),
|
||||||
'postsPerPage' => get_option( 'posts_per_page' ),
|
'postsPerPage' => get_option( 'posts_per_page' ),
|
||||||
'styles' => get_block_editor_theme_styles(),
|
'styles' => get_block_editor_theme_styles(),
|
||||||
'defaultTemplateTypes' => get_default_block_template_types(),
|
'defaultTemplateTypes' => $indexed_template_types,
|
||||||
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
|
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
|
||||||
'__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(),
|
'__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(),
|
||||||
'__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(),
|
'__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(),
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.9-beta1-52335';
|
$wp_version = '5.9-beta1-52336';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user