Make WordPress Core

Changeset 54104


Ignore:
Timestamp:
09/08/2022 04:13:10 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Editor: Update single default template description.

In order to add more template types we need to update some copy from the current default templates provided.

This updates the single template copy as it's needed to clear up the ambiguity between the single template that is the fallback for any custom post type (including post) and the menu item to be added in a subsequent commit, that will allow the creation the single-post template and any single_$post_type template.

This commit backports the original PR from Gutenberg repository:

Follow-up to [52062], [52331].

Props ntsekouras, bernhard-reiter, jameskoster, Mamaduka, scruffian.
Fixes #56534.

Location:
trunk
Files:
2 edited

Legend:

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

    r53927 r54104  
    131131        ),
    132132        'single'         => array(
    133             'title'       => _x( 'Single Post', 'Template name' ),
    134             'description' => __( 'Displays a single post.' ),
     133            'title'       => _x( 'Single', 'Template name' ),
     134            'description' => __( 'The default template for displaying any single post or attachment.' ),
    135135        ),
    136136        'page'           => array(
  • trunk/tests/phpunit/tests/block-template-utils.php

    r53454 r54104  
    128128        $this->assertSame( 'publish', $template->status );
    129129        $this->assertSame( 'theme', $template->source );
    130         $this->assertSame( 'Single Post', $template->title );
    131         $this->assertSame( 'Displays a single post.', $template->description );
     130        $this->assertSame( 'Single', $template->title );
     131        $this->assertSame( 'The default template for displaying any single post or attachment.', $template->description );
    132132        $this->assertSame( 'wp_template', $template->type );
    133133
Note: See TracChangeset for help on using the changeset viewer.