WordPress.org

Make WordPress Core

Changeset 8146


Ignore:
Timestamp:
06/20/08 18:36:20 (6 years ago)
Author:
hansengel
Message:

Actions dropdown for Comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-admin/edit-comments.php

    r8124 r8146  
    66wp_enqueue_script('admin-forms'); 
    77 
    8 if ( !empty( $_REQUEST['delete_comments'] ) ) { 
     8if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) { 
    99    check_admin_referer('bulk-comments'); 
    1010 
     
    1515        if ( !current_user_can('edit_post', $post_id) ) 
    1616            continue; 
    17         if ( !empty( $_REQUEST['spamit'] ) ) { 
     17        if ( $_REQUEST['action'] == 'markspam' ) { 
    1818            wp_set_comment_status($comment, 'spam'); 
    1919            $comments_spammed++; 
    20         } elseif ( !empty( $_REQUEST['deleteit'] ) ) { 
     20        } elseif ( $_REQUEST['action'] == 'delete' ) { 
    2121            wp_set_comment_status($comment, 'delete'); 
    2222            $comments_deleted++; 
    23         } elseif ( !empty( $_REQUEST['approveit'] ) ) { 
     23        } elseif ( $_REQUEST['action'] == 'approve' ) { 
    2424            wp_set_comment_status($comment, 'approve'); 
    2525            $comments_approved++; 
    26         } elseif ( !empty( $_REQUEST['unapproveit'] ) ) { 
     26        } elseif ( $_REQUEST['action'] == 'unapprove' ) { 
    2727            wp_set_comment_status($comment, 'hold'); 
    2828            $comments_unapproved++; 
     
    165165 
    166166<div class="alignleft"> 
     167<select name="action"> 
     168<option value="" selected>Actions</option> 
    167169<?php if ( 'approved' != $comment_status ): ?> 
    168 <input type="submit" value="<?php _e('Approve'); ?>" name="approveit" class="button-secondary" /> 
     170<option value="approve"><?php _e('Approve'); ?> 
    169171<?php endif; ?> 
    170 <input type="submit" value="<?php _e('Mark as Spam'); ?>" name="spamit" class="button-secondary" /> 
     172<option value="markspam"><?php _e('Mark as Spam'); ?></option> 
    171173<?php if ( 'moderated' != $comment_status ): ?> 
    172 <input type="submit" value="<?php _e('Unapprove'); ?>" name="unapproveit" class="button-secondary" /> 
     174<option value="unapprove"><?php _e('Unapprove'); ?></option> 
    173175<?php endif; ?> 
    174 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     176<option value="delete"><?php _e('Delete'); ?></option> 
     177</select> 
    175178<?php do_action('manage_comments_nav', $comment_status); ?> 
    176179<?php wp_nonce_field('bulk-comments'); ?> 
     180<input type="submit" name="doaction" value="Apply" class="button-secondary apply" /> 
    177181</div> 
    178182 
Note: See TracChangeset for help on using the changeset viewer.