From 7244fe456e5ade2bb57ef6df3b8d224284382966 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 13 Feb 2025 20:31:28 +0000 Subject: [PATCH] Editor: Add title and description to post format archive block templates. Follow-up to [52062], [52331], [55500]. Props poena, rinkalpagdar, im3dabasia1, parthvataliya, ruchirj, praful2111. Fixes #62326. Built from https://develop.svn.wordpress.org/trunk@59819 git-svn-id: http://core.svn.wordpress.org/trunk@59161 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-template-utils.php | 17 +++++++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index f974f6efbd..89ccada17e 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -206,6 +206,23 @@ function get_default_block_template_types() { ), ); + // Add a title and description to post format templates. + $post_formats = get_post_format_strings(); + foreach ( $post_formats as $post_format_slug => $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 + ), + ); + } + /** * Filters the list of default template types. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 3fbe47d715..7acc4228c2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59818'; +$wp_version = '6.8-alpha-59819'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.