Changeset 8851
- Timestamp:
- 09/08/2008 09:49:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r8839 r8851 14 14 wp_enqueue_script( 'admin-forms' ); 15 15 wp_enqueue_script( 'jquery-table-hotkeys' ); 16 17 if ( isset( $_POST['delete_all_spam'] ) ) { 18 check_admin_referer('bulk-spam-delete'); 19 20 $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam'" ); 21 wp_redirect('edit-comments.php?deleted=' . (int) $deleted_spam); 22 } 16 23 17 24 if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) { … … 62 69 $search = attribute_escape( $search_dirty ); 63 70 ?> 71 64 72 <?php 65 73 if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['spam'] ) ) { … … 110 118 if ( $status == $comment_status ) 111 119 $class = ' class="current"'; 112 113 120 114 121 $status_links[] = "<li class='$status'><a href=\"edit-comments.php?comment_status=$status\"$class>$label</a>"; … … 187 194 <option value="delete"><?php _e('Delete'); ?></option> 188 195 </select> 189 <input type="submit" name="doaction" value=" Apply" class="button-secondary apply" />196 <input type="submit" name="doaction" value="<?php _e('Apply'); ?>" class="button-secondary apply" /> 190 197 <?php do_action('manage_comments_nav', $comment_status); ?> 191 198 <?php wp_nonce_field('bulk-comments'); ?> 192 199 <?php if ( isset($_GET['apage']) ) { ?> 193 200 <input type="hidden" name="apage" value="<?php echo absint( $_GET['apage'] ); ?>" /> 201 <?php } 202 203 if ( 'spam' == $comment_status ) { 204 wp_nonce_field('bulk-spam-delete'); ?> 205 <input type="submit" name="delete_all_spam" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" /> 194 206 <?php } ?> 195 207 </div>
Note: See TracChangeset
for help on using the changeset viewer.