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/post.php

    r3517 r3529  
    185185
    186186    echo "<div class='wrap'>\n";
    187     echo "<p>" . __('<strong>Caution:</strong> You are about to delete the following comment:') . "</p>\n";
     187    if ( 'spam' == $_GET['delete_type'] )
     188        echo "<p>" . __('<strong>Caution:</strong> You are about to mark the following comment as spam:') . "</p>\n";
     189    else
     190        echo "<p>" . __('<strong>Caution:</strong> You are about to delete the following comment:') . "</p>\n";
    188191    echo "<table border='0'>\n";
    189192    echo "<tr><td>" . __('Author:') . "</td><td>$comment->comment_author</td></tr>\n";
     
    196199    echo "<form action='".get_settings('siteurl')."/wp-admin/post.php' method='get'>\n";
    197200    echo "<input type='hidden' name='action' value='deletecomment' />\n";
     201    if ( 'spam' == $_GET['delete_type'] )
     202        echo "<input type='hidden' name='delete_type' value='spam' />\n";
    198203    echo "<input type='hidden' name='p' value='$p' />\n";
    199204    echo "<input type='hidden' name='comment' value='{$comment->comment_ID}' />\n";
     
    227232        die( __('You are not allowed to edit comments on this post.') );
    228233
    229     wp_set_comment_status($comment->comment_ID, "delete");
    230     do_action('delete_comment', $comment->comment_ID);
     234    if ( 'spam' == $_GET['delete_type'] )
     235        wp_set_comment_status($comment->comment_ID, 'spam');
     236    else
     237        wp_delete_comment($comment->comment_ID);
    231238
    232239    if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
Note: See TracChangeset for help on using the changeset viewer.