Make WordPress Core

Changeset 56145


Ignore:
Timestamp:
07/06/2023 03:02:57 AM (2 years ago)
Author:
isabel_brison
Message:

Editor: update template titles in browse mode.

Adds more meaningful titles to templates in the browse mode template list.

Props ntsekouras, audrasjb.
Fixes #58713.

Location:
trunk
Files:
2 edited

Legend:

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

    r55992 r56145  
    119119        ),
    120120        'home'           => array(
    121             'title'       => _x( 'Home', 'Template name' ),
    122             'description' => __( 'Displays the latest posts as either the site homepage or a custom page defined under reading settings. If it exists, the Front Page template overrides this template when posts are shown on the front page.' ),
     121            'title'       => _x( 'Blog Home', 'Template name' ),
     122            'description' => __( 'Displays the latest posts as either the site homepage or as the "Posts page" as defined under reading settings. If it exists, the Front Page template overrides this template when posts are shown on the homepage.' ),
    123123        ),
    124124        'front-page'     => array(
    125125            'title'       => _x( 'Front Page', 'Template name' ),
    126             'description' => __( 'Displays your site\'s front page, whether it is set to display latest posts or a static page. The Front Page template takes precedence over all templates.' ),
     126            'description' => __( 'Displays your site\'s homepage, whether it is set to display latest posts or a static page. The Front Page template takes precedence over all templates.' ),
    127127        ),
    128128        'singular'       => array(
    129             'title'       => _x( 'Singular', 'Template name' ),
     129            'title'       => _x( 'Single Entries', 'Template name' ),
    130130            'description' => __( 'Displays any single entry, such as a post or a page. This template will serve as a fallback when a more specific template (e.g., Single Post, Page, or Attachment) cannot be found.' ),
    131131        ),
    132132        'single'         => array(
    133             'title'       => _x( 'Single', 'Template name' ),
     133            'title'       => _x( 'Single Posts', 'Template name' ),
    134134            'description' => __( 'Displays single posts on your website unless a custom template has been applied to that post or a dedicated template exists.' ),
    135135        ),
    136136        'page'           => array(
    137             'title'       => _x( 'Page', 'Template name' ),
     137            'title'       => _x( 'Pages', 'Template name' ),
    138138            'description' => __( 'Display all static pages unless a custom template has been applied or a dedicated template exists.' ),
    139139        ),
    140140        'archive'        => array(
    141             'title'       => _x( 'Archive', 'Template name' ),
     141            'title'       => _x( 'All Archives', 'Template name' ),
    142142            'description' => __( 'Displays any archive, including posts by a single author, category, tag, taxonomy, custom post type, and date. This template will serve as a fallback when more specific templates (e.g., Category or Tag) cannot be found.' ),
    143143        ),
    144144        'author'         => array(
    145             'title'       => _x( 'Author', 'Template name' ),
    146             'description' => __( 'Displays a single author\'s post archive. This template will serve as a fallback when a more specific template (e.g., Author: Admin) cannot be found.' ),
     145            'title'       => _x( 'Author Archives', 'Template name' ),
     146            'description' => __( 'Displays a single author\'s post archive. This template will serve as a fallback when a more a specific template (e.g., Author: Admin) cannot be found.' ),
    147147        ),
    148148        'category'       => array(
    149             'title'       => _x( 'Category', 'Template name' ),
    150             'description' => __( 'Displays a post category archive. This template will serve as a fallback when a more specific template (e.g., Category: Recipes) cannot be found.' ),
     149            'title'       => _x( 'Category Archives', 'Template name' ),
     150            'description' => __( 'Displays a post category archive. This template will serve as a fallback when more specific template (e.g., Category: Recipes) cannot be found.' ),
    151151        ),
    152152        'taxonomy'       => array(
     
    155155        ),
    156156        'date'           => array(
    157             'title'       => _x( 'Date', 'Template name' ),
     157            'title'       => _x( 'Date Archives', 'Template name' ),
    158158            'description' => __( 'Displays a post archive when a specific date is visited (e.g., example.com/2023/).' ),
    159159        ),
    160160        'tag'            => array(
    161             'title'       => _x( 'Tag', 'Template name' ),
    162             'description' => __( 'Displays a post tag archive. This template will serve as a fallback when a more specific template (e.g., Tag: Pizza) cannot be found.' ),
     161            'title'       => _x( 'Tag Archives', 'Template name' ),
     162            'description' => __( 'Displays a post tag archive. This template will serve as a fallback when more specific template (e.g., Tag: Pizza) cannot be found.' ),
    163163        ),
    164164        'attachment'     => array(
    165             'title'       => __( 'Media' ),
     165            'title'       => __( 'Attachment Pages' ),
    166166            'description' => __( 'Displays when a visitor views the dedicated page that exists for any media attachment.' ),
    167167        ),
    168168        'search'         => array(
    169             'title'       => _x( 'Search', 'Template name' ),
     169            'title'       => _x( 'Search Results', 'Template name' ),
    170170            'description' => __( 'Displays when a visitor performs a search on your website.' ),
    171171        ),
     
    175175        ),
    176176        '404'            => array(
    177             'title'       => _x( '404', 'Template name' ),
     177            'title'       => _x( 'Page: 404', 'Template name' ),
    178178            'description' => __( 'Displays when a visitor views a non-existent page, such as a dead link or a mistyped URL.' ),
    179179        ),
  • trunk/tests/phpunit/tests/block-template-utils.php

    r55993 r56145  
    136136        $this->assertSame( 'publish', $template->status );
    137137        $this->assertSame( 'theme', $template->source );
    138         $this->assertSame( 'Single', $template->title );
     138        $this->assertSame( 'Single Posts', $template->title );
    139139        $this->assertSame( 'Displays single posts on your website unless a custom template has been applied to that post or a dedicated template exists.', $template->description );
    140140        $this->assertSame( 'wp_template', $template->type );
Note: See TracChangeset for help on using the changeset viewer.