Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r17705 r18234  
    4646    var $sticky_posts_count = 0;
    4747
    48     function WP_Posts_List_Table() {
     48    function __construct() {
    4949        global $post_type_object, $post_type, $wpdb;
    5050
     
    7575        }
    7676
    77         parent::WP_List_Table( array(
     77        parent::__construct( array(
    7878            'plural' => 'posts',
    7979        ) );
     
    282282        $post_status = !empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all';
    283283        if ( post_type_supports( $post_type, 'comments' ) && !in_array( $post_status, array( 'pending', 'draft', 'future' ) ) )
    284             $posts_columns['comments'] = '<div class="vers"><img alt="' . esc_attr__( 'Comments' ) . '" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></div>';
     284            $posts_columns['comments'] = '<span class="vers"><img alt="' . esc_attr__( 'Comments' ) . '" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></span>';
    285285
    286286        $posts_columns['date'] = __( 'Date' );
     
    551551                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>";
    552552                }
    553                 if ( in_array( $post->post_status, array( 'pending', 'draft' ) ) ) {
    554                     if ( $can_edit_post )
    555                         $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>';
    556                 } elseif ( 'trash' != $post->post_status ) {
    557                     $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>';
     553                if ( $post_type_object->public ) {
     554                    if ( in_array( $post->post_status, array( 'pending', 'draft' ) ) ) {
     555                        if ( $can_edit_post )
     556                            $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>';
     557                    } elseif ( 'trash' != $post->post_status ) {
     558                        $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>';
     559                    }
    558560                }
    559561
     
    10041006            <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
    10051007            <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
     1008            <span class="error" style="display:none"></span>
    10061009            <br class="clear" />
    10071010        </p>
Note: See TracChangeset for help on using the changeset viewer.