Make WordPress Core

Changeset 21086


Ignore:
Timestamp:
06/15/2012 05:50:50 PM (13 years ago)
Author:
markjaquith
Message:

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

Backports [21047] for the 3.3 branch.

File:
1 edited

Legend:

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

    r19321 r21086  
    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.