Add Site Editor and PHP changes from Gutenberg 10.1 - 11.9

- First pass at adding the site editor from the Gutenberg plugin to
  wp-admin/site-editor.php.
- Adds miscellaneous PHP changes from Gutenberg 10.1 - 11.9.

Follows [52042].
See #54337.
Props youknowriad, aristath, hellofromtonya, gziolo.


git-svn-id: https://develop.svn.wordpress.org/trunk@52069 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson
2021-11-09 02:15:23 +00:00
parent ecf1d6a158
commit f034bc832e
59 changed files with 4240 additions and 168 deletions

View File

@@ -4075,3 +4075,14 @@ function create_initial_theme_features() {
)
);
}
/**
* Returns whether the current theme is a block-based theme or not.
*
* @since 5.9.0
*
* @return boolean Whether the current theme is a block-based theme or not.
*/
function wp_is_block_template_theme() {
return is_readable( get_theme_file_path( '/block-templates/index.html' ) );
}