Make WordPress Core


Ignore:
Timestamp:
02/14/2006 08:09:13 PM (19 years ago)
Author:
ryan
Message:

Option to 'mark as spam' in notification e-mail from Mark J. fixes #1048

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/list-manipulation.php

    r3517 r3529  
    6464    }
    6565    break;
     66case 'delete-comment-as-spam' :
     67    $id = (int) $_POST['id'];
     68
     69    if ( !$comment = get_comment($id) )
     70        die('0');
     71    if ( !current_user_can('edit_post', $comment->comment_post_ID) )
     72        die('-1');
     73
     74    if ( wp_set_comment_status($comment->comment_ID, 'spam') ) {
     75        die('1');
     76    } else {
     77        die('0');
     78    }
     79    break;
    6680case 'delete-link-category' :
    6781    $id = (int) $_POST['id'];
Note: See TracChangeset for help on using the changeset viewer.