Changeset 3529 for trunk/wp-admin/post.php
- Timestamp:
- 02/14/2006 08:09:13 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r3517 r3529 185 185 186 186 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"; 188 191 echo "<table border='0'>\n"; 189 192 echo "<tr><td>" . __('Author:') . "</td><td>$comment->comment_author</td></tr>\n"; … … 196 199 echo "<form action='".get_settings('siteurl')."/wp-admin/post.php' method='get'>\n"; 197 200 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"; 198 203 echo "<input type='hidden' name='p' value='$p' />\n"; 199 204 echo "<input type='hidden' name='comment' value='{$comment->comment_ID}' />\n"; … … 227 232 die( __('You are not allowed to edit comments on this post.') ); 228 233 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); 231 238 232 239 if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
Note: See TracChangeset
for help on using the changeset viewer.