Make WordPress Core

Changeset 29695


Ignore:
Timestamp:
09/03/2014 11:32:52 AM (10 years ago)
Author:
SergeyBiryukov
Message:

Restore the post type's view_item label for preview links that don't submit the changes.

fixes #28350.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r29625 r29695  
    11911191    if ( current_user_can( 'read_post', $post->ID ) ) {
    11921192        $ptype = get_post_type_object( $post->post_type );
    1193         if( 'draft' == $post->post_status ) {
    1194             $view_post = __( 'Preview' );
    1195         } else {
    1196             $view_post = $ptype->labels->view_item;
    1197         }
     1193        $view_post = $ptype->labels->view_item;
    11981194    }
    11991195
  • trunk/src/wp-includes/admin-bar.php

    r29170 r29695  
    500500                $wp_admin_bar->add_menu( array(
    501501                    'id' => 'preview',
    502                     'title' => __( 'Preview' ),
     502                    'title' => $post_type_object->labels->view_item,
    503503                    'href' => esc_url( $preview_link ),
    504504                    'meta' => array( 'target' => 'wp-preview-' . $post->ID ),
Note: See TracChangeset for help on using the changeset viewer.