Hide delete checkbox and remove edit link for entries the current user cannot delete or edit
git-svn-id: http://svn.automattic.com/wordpress/trunk@7410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0764f3594b
commit
3092ae5e3c
|
@ -40,7 +40,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
||||||
|
|
||||||
case 'cb':
|
case 'cb':
|
||||||
?>
|
?>
|
||||||
<th scope="row" class="check-column"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th>
|
<th scope="row" class="check-column"><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /><?php } ?></th>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
case 'modified':
|
case 'modified':
|
||||||
|
@ -72,7 +72,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
||||||
break;
|
break;
|
||||||
case 'title':
|
case 'title':
|
||||||
?>
|
?>
|
||||||
<td><strong><a class="row-title" href="post.php?action=edit&post=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a></strong>
|
<td><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="post.php?action=edit&post=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong>
|
||||||
<?php if ( !empty($post->post_password) ) { _e(' — <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' — <strong>Private</strong>'); } ?></td>
|
<?php if ( !empty($post->post_password) ) { _e(' — <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' — <strong>Private</strong>'); } ?></td>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue