WordPress.org

Make WordPress Core

Ticket #8111: template9710.diff

File template9710.diff, 681 bytes (added by mrmist, 5 years ago)

change to includes\template 9710 rev to limit edit posts view

  • template.

    old new  
    12421242        $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); 
    12431243        $edit_link = get_edit_post_link( $post->ID ); 
    12441244        $title = _draft_or_post_title(); 
     1245        if ( current_user_can( 'edit_others_posts' ) or $current_user->ID == $post->post_author ) { 
    12451246?> 
    12461247        <tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $rowclass . ' author-' . $post_owner . ' status-' . $post->post_status ); ?> iedit' valign="top"> 
    12471248<?php 
     
    14221423?> 
    14231424        </tr> 
    14241425<?php 
     1426        } // Current user can edit others posts check 
    14251427        $post = $global_post; 
    14261428} 
    14271429