Changeset 55500
- Timestamp:
- 03/09/2023 04:29:13 PM (19 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r55493 r55500 116 116 'index' => array( 117 117 'title' => _x( 'Index', 'Template name' ), 118 'description' => __( ' Displays posts.' ),118 'description' => __( 'Used as a fallback template for all pages when a more specific template is not defined.' ), 119 119 ), 120 120 'home' => array( 121 121 'title' => _x( 'Home', 'Template name' ), 122 'description' => __( 'Displays posts on the homepage, or on the Posts page if a static homepage is set.' ),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.' ), 123 123 ), 124 124 'front-page' => array( 125 125 'title' => _x( 'Front Page', 'Template name' ), 126 'description' => __( 'Displays the homepage.' ),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.' ), 127 127 ), 128 128 'singular' => array( 129 129 'title' => _x( 'Singular', 'Template name' ), 130 'description' => __( 'Displays a single post or page.' ),130 '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.' ), 131 131 ), 132 132 'single' => array( 133 133 'title' => _x( 'Single', 'Template name' ), 134 'description' => __( ' The default template for displaying any single post or attachment.' ),134 'description' => __( 'Displays single posts on your website unless a custom template has been applied to that post or a dedicated template exists.' ), 135 135 ), 136 136 'page' => array( 137 137 'title' => _x( 'Page', 'Template name' ), 138 'description' => __( 'Display s a single page.' ),138 'description' => __( 'Display all static pages unless a custom template has been applied or a dedicated template exists.' ), 139 139 ), 140 140 'archive' => array( 141 141 'title' => _x( 'Archive', 'Template name' ), 142 'description' => __( 'Displays posts by a category, tag, author, or date.' ),142 '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.' ), 143 143 ), 144 144 'author' => array( 145 145 'title' => _x( 'Author', 'Template name' ), 146 'description' => __( 'Displays latest posts written by a single author.' ),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.' ), 147 147 ), 148 148 'category' => array( 149 149 'title' => _x( 'Category', 'Template name' ), 150 'description' => __( 'Displays latest posts from a single post category.' ),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.' ), 151 151 ), 152 152 'taxonomy' => array( 153 153 'title' => _x( 'Taxonomy', 'Template name' ), 154 'description' => __( 'Displays latest posts from a single post taxonomy.' ),154 'description' => __( 'Displays a custom taxonomy archive. Like categories and tags, taxonomies have terms which you use to classify things. For example: a taxonomy named "Art" can have multiple terms, such as "Modern" and "18th Century." This template will serve as a fallback when a more specific template (e.g, Taxonomy: Art) cannot be found.' ), 155 155 ), 156 156 'date' => array( 157 157 'title' => _x( 'Date', 'Template name' ), 158 'description' => __( 'Displays posts from a specific date.' ), 158 /* translators: %s: Example URL. */ 159 'description' => sprintf( 160 __( 'Displays a post archive when a specific date is visited (e.g., %s).' ), 161 __( 'example.com/2023/' ) 162 ), 159 163 ), 160 164 'tag' => array( 161 165 'title' => _x( 'Tag', 'Template name' ), 162 'description' => __( 'Displays latest posts with a single post tag.' ),166 '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.' ), 163 167 ), 164 168 'attachment' => array( 165 169 'title' => __( 'Media' ), 166 'description' => __( 'Displays individual media items or attachments.' ),170 'description' => __( 'Displays when a visitor views the dedicated page that exists for any media attachment.' ), 167 171 ), 168 172 'search' => array( 169 173 'title' => _x( 'Search', 'Template name' ), 170 'description' => __( 'Displays search results.' ),174 'description' => __( 'Displays when a visitor performs a search on your website.' ), 171 175 ), 172 176 'privacy-policy' => array( 173 177 'title' => __( 'Privacy Policy' ), 174 'description' => __( 'Displays the privacy policy page.' ),178 'description' => __( 'Displays your site\'s Privacy Policy page.' ), 175 179 ), 176 180 '404' => array( 177 181 'title' => _x( '404', 'Template name' ), 178 'description' => __( 'Displays when no content is found.' ),182 'description' => __( 'Displays when a visitor views a non-existent page, such as a dead link or a mistyped URL.' ), 179 183 ), 180 184 ); -
trunk/tests/phpunit/tests/block-template-utils.php
r55493 r55500 135 135 $this->assertSame( 'theme', $template->source ); 136 136 $this->assertSame( 'Single', $template->title ); 137 $this->assertSame( ' The default template for displaying any single post or attachment.', $template->description );137 $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 ); 138 138 $this->assertSame( 'wp_template', $template->type ); 139 139
Note: See TracChangeset
for help on using the changeset viewer.