From a9a59b97e69cf70a15a8d8b7f34d926ee1b2eee0 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Wed, 25 May 2022 12:42:29 +0300 Subject: [PATCH] [Site Editor]: Update single default template copy --- .../wordpress-6.1/block-template-utils.php | 29 +++++++++++++++++++ lib/load.php | 1 + 2 files changed, 30 insertions(+) create mode 100644 lib/compat/wordpress-6.1/block-template-utils.php diff --git a/lib/compat/wordpress-6.1/block-template-utils.php b/lib/compat/wordpress-6.1/block-template-utils.php new file mode 100644 index 0000000000000..6d313f294fbc4 --- /dev/null +++ b/lib/compat/wordpress-6.1/block-template-utils.php @@ -0,0 +1,29 @@ + _x( 'Single', 'Template name', 'gutenberg' ), + 'description' => __( 'The default template for displaying any single post or attachment.', 'gutenberg' ), + ); + } + return $default_template_types; +} +add_filter( 'default_template_types', 'gutenberg_get_default_block_template_types', 10, 2 ); diff --git a/lib/load.php b/lib/load.php index 5a613f94c9169..bccf09653abb2 100644 --- a/lib/load.php +++ b/lib/load.php @@ -126,6 +126,7 @@ function gutenberg_is_experiment_enabled( $name ) { require __DIR__ . '/compat/wordpress-6.1/get-global-styles-and-settings.php'; require __DIR__ . '/compat/wordpress-6.1/script-loader.php'; require __DIR__ . '/compat/wordpress-6.1/class-wp-theme-json-6-1.php'; +require __DIR__ . '/compat/wordpress-6.1/block-template-utils.php'; // Experimental features. remove_action( 'plugins_loaded', '_wp_theme_json_webfonts_handler' ); // Turns off WP 6.0's stopgap handler for Webfonts API.