Make WordPress Core

Ticket #27059: 27059.patch

File 27059.patch, 726 bytes (added by mordauk, 12 years ago)

Show View {post type} if current user can read private posts

  • wp-admin/includes/post.php

     
    10821082
    10831083        list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
    10841084
    1085         if ( 'publish' == get_post_status( $post ) ) {
    1086                 $ptype = get_post_type_object($post->post_type);
     1085        $ptype = get_post_type_object($post->post_type);
     1086        if ( 'publish' == get_post_status( $post ) || ( 'private' == get_post_status( $post ) && current_user_can( $ptype->cap->read_private_posts ) ) ) {
    10871087                $view_post = $ptype->labels->view_item;
    10881088                $title = __('Click to edit this part of the permalink');
    10891089        } else {