Editor: Add missing default template areas to the post/page editor settings.

This ensures that default template area settings are displayed when editing a template in the post/page editor, which previously got lost during backporting for 5.9.

Follow-up to [52232].

Props Mamaduka, costdev, gziolo.
Fixes #54679.
Built from https://develop.svn.wordpress.org/trunk@52409


git-svn-id: http://core.svn.wordpress.org/trunk@52001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-12-22 13:00:03 +00:00
parent 9cb7908de2
commit 4a22a4cec3
2 changed files with 5 additions and 1 deletions

View File

@ -229,6 +229,10 @@ if ( $is_new_post && ! isset( $editor_settings['template'] ) && 'post' === $post
}
}
if ( wp_is_block_theme() && $editor_settings['supportsTemplateMode'] ) {
$editor_settings['defaultTemplatePartAreas'] = get_allowed_block_template_part_areas();
}
/**
* Scripts
*/

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-beta4-52408';
$wp_version = '5.9-beta4-52409';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.