'closed', 'count' => $affected ); break; case 'open' : foreach ( $topic_ids as $topic_id ) { $affected += bb_open_topic( $topic_id ); } $query_vars = array( 'message' => 'opened', 'count' => $affected ); break; case 'delete' : foreach ( $topic_ids as $topic_id ) { $affected += (int) (bool) bb_delete_topic( $topic_id, 1 ); } $query_vars = array( 'message' => 'deleted', 'count' => $affected ); break; case 'undelete' : foreach ( $topic_ids as $topic_id ) { $affected += (int) (bool) bb_delete_topic( $topic_id, 0 ); } $query_vars = array( 'message' => 'undeleted', 'count' => $affected ); break; default : if ( $action ) $query_vars = apply_filters( "bulk_topic__$action", array(), $topic_ids ); 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( 'Topic undeleted.', '%s topics undeleted.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; case 'deleted': bb_admin_notice( sprintf( _n( 'Topic deleted.', '%s topics deleted.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; case 'opened': bb_admin_notice( sprintf( _n( 'Topic opened.', '%s topics opened.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; case 'closed': bb_admin_notice( sprintf( _n( 'Topic closed.', '%s topics closed.', $message_count ), bb_number_format_i18n( $message_count ) ) ); break; } } $bb_admin_body_class = ' bb-admin-topics'; 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( 'topic_link', 'bb_make_link_view_all' ); add_filter( 'topic_last_post_link', 'bb_make_link_view_all' ); $topic_query_vars = array( 'topic_status' => 'normal', 'open' => 'open', 'count' => true, 'per_page' => 20 ); if ( isset($_POST['search']) && $_POST['search'] ) { $topic_query_vars['post_status'] = 'all'; } elseif ( isset($_GET['search']) && $_GET['search'] ) { $topic_query_vars['post_status'] = 'all'; } $topic_query = new BB_Query_Form( 'topic', $topic_query_vars ); $topics = $topic_query->results; ?>

get( 'search' ); $h2_forum = $topic_query->get( 'forum_id' ); $h2_tag = $topic_query->get( 'tag_id' ); $h2_author = $topic_query->get( 'topic_author_id' ); $h2_search = $h2_search ? ' ' . sprintf( __('containing “%s”'), esc_html( $h2_search ) ) : ''; $h2_forum = $h2_forum ? ' ' . sprintf( __('in “%s”') , get_forum_name( $h2_forum ) ) : ''; $h2_tag = $h2_tag ? ' ' . sprintf( __('with tag “%s”'), esc_html( bb_get_tag_name( $h2_tag ) ) ) : ''; $h2_author = $h2_author ? ' ' . sprintf( __('by %s') , esc_html( get_user_name( $h2_author ) ) ) : ''; if ( $h2_search || $h2_forum || $h2_tag || $h2_author ) { echo ''; printf( __( '%1$s%2$s%3$s%4$s' ), $h2_search, $h2_forum, $h2_tag, $h2_author ); echo ''; } ?>

form( array('tag' => true, 'topic_author' => true, 'topic_status' => true, 'open' => true, 'submit' => __('Filter')) ); ?>

__( 'Delete' ), 'undelete' => __( 'Undelete' ), 'open' => __( 'Open' ), 'close' => __( 'Close' ), ); if ( is_numeric( $bulk_action = $topic_query->get( 'topic_status' ) ) ) unset( $bulk_actions[ $bulk_action ? 'delete' : 'undelete' ] ); if ( is_numeric( $bulk_action = $topic_query->get( 'open' ) ) ) unset( $bulk_actions[ $bulk_action ? 'open' : 'close' ] ); unset( $bulk_action ); do_action_ref_array( 'bulk_topic_actions', array( &$bulk_actions, $topic_query ) ); ?>
found_rows ) : ?>
get( 'per_page' ) + 1 ), $page * $topic_query->get( 'per_page' ) < $topic_query->found_rows ? bb_number_format_i18n( $page * $topic_query->get( 'per_page' ) ) : '' . bb_number_format_i18n( $topic_query->found_rows ) . '', '' . bb_number_format_i18n( $topic_query->found_rows ) . '' ); ?> $page, 'total' => $topic_query->found_rows, 'per_page' => $topic_query->get( 'per_page' ), 'mod_rewrite' => false, 'prev_text' => __( '«' ), 'next_text' => __( '»' ) ); echo $page_number_links = get_page_number_links( $_page_link_args ); ?>
>
| post_id ); ?> | $topic->topic_id, 'before' => '', 'after' => '', 'close_text' => __( 'Close' ), 'open_text' => _x( 'Open', 'action' ) ) ); ?> | $topic->topic_id, 'before' => '', 'after' => '', 'delete_text' => __( 'Delete' ), 'undelete_text' => __( 'Undelete' ) ) ); ?>  
topic_poster, '16' ); ?> H:i:s' ); } else { printf( __( '%s ago' ), get_topic_start_time( 'since' ) ); } ?> H:i:s' ); } else { printf( __( '%s ago' ), get_topic_time( 'since' ) ); } ?>
found_rows ) : ?>