'deleted', 'count' => $count ); break; case 'undelete' : foreach ( $post_ids as $post_id ) { $count += (int) (bool) bb_delete_post( $post_id, 0 ); } $query_vars = array( 'message' => 'undeleted', 'count' => $count ); break; default : if ( $action ) $query_vars = apply_filters( "bulk_post__$action", array(), $post_ids, $action ); break; } bb_safe_redirect( add_query_arg( $query_vars ) ); exit; } if ( !empty( $_GET['message'] ) ) { $message_count = isset( $_GET['count'] ) ? (int) $_GET['count'] : 1; switch ( (string) $_GET['message'] ) { case 'undeleted': bb_admin_notice( sprintf( _n( 'Post undeleted.', '%s posts undeleted.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; case 'deleted': bb_admin_notice( sprintf( _n( 'Post deleted.', '%s posts deleted.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; case 'spammed': bb_admin_notice( sprintf( _n( 'Post spammed.', '%s posts spammed.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; case 'unspammed-normal': bb_admin_notice( sprintf( _n( 'Post removed from spam. It is now a normal post.', '%s posts removed from spam. They are now normal posts.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; case 'unspammed-deleted': bb_admin_notice( sprintf( _n( 'Post removed from spam. It is now a deleted post.', '%s posts removed from spam. They are nowdeleted posts.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; } } $ip_available = false; if ( bb_current_user_can( 'view_by_ip' ) ) { $ip_available = true; } elseif (isset($_GET['poster_ip'])) { unset( $_GET['poster_ip'] ); } $bb_admin_body_class = ' bb-admin-posts'; bb_get_admin_header(); if ( !bb_current_user_can('browse_deleted') ) die(__("Now how'd you get here? And what did you think you'd being doing?")); //This should never happen. add_filter( 'get_topic_where', 'bb_no_where' ); add_filter( 'get_topic_link', 'bb_make_link_view_all' ); add_filter( 'post_edit_uri', 'bb_make_link_view_all' ); $post_query = new BB_Query_Form( 'post', array( 'post_status' => 'normal', 'count' => true, 'per_page' => 20 ) ); $bb_posts =& $post_query->results; $total = $post_query->found_rows; ?>