Changeset 7083

Show
Ignore:
Timestamp:
02/28/08 07:04:52 (9 months ago)
Author:
ryan
Message:

Add unapprove button

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit-comments.php

    r7082 r7083  
    1010    check_admin_referer('bulk-comments'); 
    1111 
    12     $comments_deleted = $comments_approved = $comments_spammed = 0;  
     12    $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0;  
    1313    foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each 
    1414        $comment = (int) $comment; 
     
    2626            wp_set_comment_status($comment, 'approve'); 
    2727            $comments_approved++; 
     28        } elseif ( !empty( $_REQUEST['unapproveit'] ) ) { 
     29            wp_set_comment_status($comment, 'hold'); 
     30            $comments_unapproved++; 
    2831        } 
    2932    endforeach; 
    30     $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed
     33    $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed . '&unapproved=' . $comments_unapproved
    3134    if ( !empty($_REQUEST['mode']) ) 
    3235        $redirect_to = add_query_arg('mode', $_REQUEST['mode'], $redirect_to); 
     
    162165<?php endif; ?> 
    163166<input type="submit" value="<?php _e('Mark as Spam'); ?>" name="spamit" class="button-secondary" /> 
     167<?php if ( 'moderated' != $comment_status ): ?> 
     168<input type="submit" value="<?php _e('Unapprove'); ?>" name="unapproveit" class="button-secondary" /> 
     169<?php endif; ?> 
    164170<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary" /> 
    165171<?php do_action('manage_comments_nav', $comment_status); ?>