Don't show the view link for a future post unless the current user has the permissions to edit the post. Treat future posts as a preview case. Props ocean90. fixes #18894
git-svn-id: http://svn.automattic.com/wordpress/trunk@19213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eea7874845
commit
91bf9d9bae
|
@ -553,7 +553,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>";
|
||||
}
|
||||
if ( $post_type_object->public ) {
|
||||
if ( in_array( $post->post_status, array( 'pending', 'draft' ) ) ) {
|
||||
if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {
|
||||
if ( $can_edit_post )
|
||||
$actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';
|
||||
} elseif ( 'trash' != $post->post_status ) {
|
||||
|
|
Loading…
Reference in New Issue