case 'spam_comments':
                $query = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = %s", 'spam' ) );
                if ( $query ) {
                    foreach ( $query as $id ) {
                        wp_delete_comment( (int) $id, true );