WordPress.org

Make WordPress Core

Changeset 19213


Ignore:
Timestamp:
11/08/11 14:24:14 (4 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r19192 r19213  
    554554                } 
    555555                if ( $post_type_object->public ) { 
    556                     if ( in_array( $post->post_status, array( 'pending', 'draft' ) ) ) { 
     556                    if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { 
    557557                        if ( $can_edit_post ) 
    558558                            $actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>'; 
Note: See TracChangeset for help on using the changeset viewer.