diff --git a/lib/compat/wordpress-6.8/block-template-utils.php b/lib/compat/wordpress-6.8/block-template-utils.php new file mode 100644 index 00000000000000..6e792f5be886eb --- /dev/null +++ b/lib/compat/wordpress-6.8/block-template-utils.php @@ -0,0 +1,29 @@ + $post_format_name ) { + $default_template_types[ 'taxonomy-post_format-post-format-' . $post_format_slug ] = array( + 'title' => sprintf( + /* translators: %s: Post format name. */ + _x( 'Post Format: %s', 'Template name' ), + $post_format_name + ), + 'description' => sprintf( + /* translators: %s: Post format name. */ + __( 'Displays the %s post format archive.' ), + $post_format_name + ), + ); + } + return $default_template_types; +} + +add_filter( 'default_template_types', 'gutenberg_post_format_template_title_description', 10, 1 ); diff --git a/lib/load.php b/lib/load.php index 789c9f9980e9a3..769066111fb95a 100644 --- a/lib/load.php +++ b/lib/load.php @@ -104,6 +104,7 @@ function gutenberg_is_experiment_enabled( $name ) { require __DIR__ . '/compat/wordpress-6.8/post.php'; require __DIR__ . '/compat/wordpress-6.8/site-editor.php'; require __DIR__ . '/compat/wordpress-6.8/class-gutenberg-rest-user-controller.php'; +require __DIR__ . '/compat/wordpress-6.8/block-template-utils.php'; // Experimental features. require __DIR__ . '/experimental/block-editor-settings-mobile.php';