Make WordPress Core


Ignore:
Timestamp:
09/20/2016 08:01:55 PM (9 years ago)
Author:
swissspidy
Message:

Toolbar: Add a 'View Posts' link to the toolbar when on the post listing screen.

This adds a new link to visit the post type archive if the post type supports it. Also introduces a new view_items label to get_post_type_labels().

Props paulwilde, akibjorklund, swissspidy.
Fixes #34113.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r38408 r38634  
    12351235 * - `new_item` - Label for the new item page title. Default is 'New Post' / 'New Page'.
    12361236 * - `view_item` - Label for viewing a singular item. Default is 'View Post' / 'View Page'.
     1237 * - `view_items` - Label for viewing post type archives. Default is 'View Posts' / 'View Pages'.
    12371238 * - `search_items` - Label for searching plural items. Default is 'Search Posts' / 'Search Pages'.
    12381239 * - `not_found` - Label used when no items are found. Default is 'No posts found' / 'No pages found'.
     
    12681269 *              `items_list_navigation`, and `items_list` labels.
    12691270 * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
     1271 * @since 4.7.0 Added the `view_items` label.
    12701272 *
    12711273 * @access private
     
    12831285        'new_item' => array( __('New Post'), __('New Page') ),
    12841286        'view_item' => array( __('View Post'), __('View Page') ),
     1287        'view_items' => array( __('View Posts'), __('View Pages') ),
    12851288        'search_items' => array( __('Search Posts'), __('Search Pages') ),
    12861289        'not_found' => array( __('No posts found.'), __('No pages found.') ),
Note: See TracChangeset for help on using the changeset viewer.