Make WordPress Core


Ignore:
Timestamp:
08/19/2009 08:35:24 AM (17 years ago)
Author:
azaozz
Message:

"Trash" updates, props caesarsgrunt, see #4529

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-attachment-rows.php

    r11768 r11841  
    6060    case 'cb':
    6161        ?>
    62         <th scope="row" class="check-column"><input type="checkbox" name="media[]" value="<?php the_ID(); ?>" /></th>
     62        <th scope="row" class="check-column"><?php if ( current_user_can('edit_post', $post->ID) ) { ?><input type="checkbox" name="media[]" value="<?php the_ID(); ?>" /><?php } ?></th>
    6363        <?php
    6464        break;
     
    9090        <?php
    9191        $actions = array();
    92         if ( $is_trash && current_user_can('delete_post', $post->ID) ) {
    93             $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
    94             $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
     92        if ( $is_trash ) {
     93            if ( current_user_can('delete_post', $post->ID) ) {
     94                $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
     95                $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
     96            }
    9597        } else {
    9698            if ( current_user_can('edit_post', $post->ID) )
Note: See TracChangeset for help on using the changeset viewer.