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. git-svn-id: https://develop.svn.wordpress.org/trunk@27483 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
292f70aba3
commit
e4bb7b0e8c
@ -1049,9 +1049,12 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
||||
|
||||
list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
|
||||
|
||||
if ( 'publish' == get_post_status( $post ) ) {
|
||||
$ptype = get_post_type_object($post->post_type);
|
||||
if ( current_user_can( 'read_post', $post->ID ) ) {
|
||||
$ptype = get_post_type_object( $post->post_type );
|
||||
$view_post = $ptype->labels->view_item;
|
||||
}
|
||||
|
||||
if ( 'publish' == get_post_status( $post ) ) {
|
||||
$title = __('Click to edit this part of the permalink');
|
||||
} else {
|
||||
$title = __('Temporary permalink. Click to edit this part.');
|
||||
|
Loading…
Reference in New Issue
Block a user