Make WordPress Core


Ignore:
Timestamp:
02/05/2010 05:59:18 PM (15 years ago)
Author:
ryan
Message:

Fix delete media nonces. Props nacin. fixes #12085

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upload.php

    r12655 r12972  
    389389        if ( current_user_can('delete_post', $post->ID) )
    390390            if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
    391                 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
     391                $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-attachment_' . $post->ID) . "'>" . __('Trash') . "</a>";
    392392            } else {
    393393                $delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
    394                 $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
     394                $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-attachment_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
    395395            }
    396396        $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
Note: See TracChangeset for help on using the changeset viewer.