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
This commit is contained in:
Sergey Biryukov 2025-02-13 20:31:28 +00:00
parent 19f101215e
commit 7244fe456e
2 changed files with 18 additions and 1 deletions

View File

@ -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.
*

View File

@ -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.