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:
markjaquith 2008-03-20 04:30:38 +00:00
parent 0764f3594b
commit 3092ae5e3c
1 changed files with 2 additions and 2 deletions

View File

@ -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&amp;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&amp;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(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); } ?></td> <?php if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); } ?></td>
<?php <?php
break; break;