WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/10/2012 04:22:55 PM (6 years ago)
Author:
ryan
Message:

In excerpt view, show the excerpt only if the user can read_post.

File:
1 edited

Legend:

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

    r20569 r21047  
    528528            <td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ); ?>"><?php echo $title ?></a><?php } else { echo $title; }; _post_states( $post ); ?></strong>
    529529<?php
    530                     if ( 'excerpt' == $mode ) {
     530                    if ( 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) )
    531531                        the_excerpt();
    532                     }
    533532                }
    534533
Note: See TracChangeset for help on using the changeset viewer.