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.

git-svn-id: https://develop.svn.wordpress.org/trunk@59819 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2025-02-13 20:29:55 +00:00
parent 626d9af280
commit 474f6c471b

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