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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52409 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-12-22 12:58:42 +00:00
parent e45483fe8a
commit 7f222a7159

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
*/