Make WordPress Core

Changeset 59819


Ignore:
Timestamp:
02/13/2025 08:29:55 PM (19 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-template-utils.php

    r59159 r59819  
    206206                ),
    207207        );
     208
     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        }
    208225
    209226        /**
Note: See TracChangeset for help on using the changeset viewer.