WordPress.org

Make WordPress Core

Changeset 27483


Ignore:
Timestamp:
03/09/2014 01:52:08 PM (7 years ago)
Author:
nacin
Message:

Editor: Show 'View Post' for any post the author can read.

This expands it to private posts and matches the logic in the toolbar.

props mordauk, SergeyBiryukov.
fixes #27059.

File:
1 edited

Legend:

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

    r27405 r27483  
    10501050    list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
    10511051
     1052    if ( current_user_can( 'read_post', $post->ID ) ) {
     1053        $ptype = get_post_type_object( $post->post_type );
     1054        $view_post = $ptype->labels->view_item;
     1055    }
     1056
    10521057    if ( 'publish' == get_post_status( $post ) ) {
    1053         $ptype = get_post_type_object($post->post_type);
    1054         $view_post = $ptype->labels->view_item;
    10551058        $title = __('Click to edit this part of the permalink');
    10561059    } else {
Note: See TracChangeset for help on using the changeset viewer.