Skip to content

Commit 474f6c4

Browse files
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
1 parent 626d9af commit 474f6c4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/wp-includes/block-template-utils.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,23 @@ function get_default_block_template_types() {
206206
),
207207
);
208208

209+
// Add a title and description to post format templates.
210+
$post_formats = get_post_format_strings();
211+
foreach ( $post_formats as $post_format_slug => $post_format_name ) {
212+
$default_template_types[ 'taxonomy-post_format-post-format-' . $post_format_slug ] = array(
213+
'title' => sprintf(
214+
/* translators: %s: Post format name. */
215+
_x( 'Post Format: %s', 'Template name' ),
216+
$post_format_name
217+
),
218+
'description' => sprintf(
219+
/* translators: %s: Post format name. */
220+
__( 'Displays the %s post format archive.' ),
221+
$post_format_name
222+
),
223+
);
224+
}
225+
209226
/**
210227
* Filters the list of default template types.
211228
*

0 commit comments

Comments
 (0)