Make WordPress Core

Changeset 12272


Ignore:
Timestamp:
11/24/2009 04:46:23 PM (16 years ago)
Author:
ryan
Message:

Check action type to avoid warnings. Props sirzooro. fixes #11203

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r12259 r12272  
    185185<div id="delete-action">
    186186<?php
    187 if ( current_user_can("delete_${post_type}", $post->ID) ) {
     187if ( ( 'edit' == $action ) && current_user_can("delete_${post_type}", $post->ID) ) {
    188188    if ( !EMPTY_TRASH_DAYS ) {
    189189        $delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
Note: See TracChangeset for help on using the changeset viewer.