raw
mp-wp_genesis           1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * Edit Comments Administration Panel.
mp-wp_genesis 4 *
mp-wp_genesis 5 * @package WordPress
mp-wp_genesis 6 * @subpackage Administration
mp-wp_genesis 7 */
mp-wp_genesis 8
mp-wp_genesis 9 /** WordPress Administration Bootstrap */
mp-wp_genesis 10 require_once('admin.php');
mp-wp_genesis 11
mp-wp_genesis 12 wp_enqueue_script('admin-comments');
mp-wp_genesis 13 enqueue_comment_hotkeys_js();
mp-wp_genesis 14
mp-wp_genesis 15 $post_id = isset($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0;
mp-wp_genesis 16
mp-wp_genesis 17 if ( ( isset( $_REQUEST['delete_all_spam'] ) || isset( $_REQUEST['delete_all_spam2'] ) ) && !empty( $_REQUEST['pagegen_timestamp'] ) ) {
mp-wp_genesis 18 check_admin_referer('bulk-spam-delete', '_spam_nonce');
mp-wp_genesis 19
mp-wp_genesis 20 $delete_time = $wpdb->escape( $_REQUEST['pagegen_timestamp'] );
mp-wp_genesis 21 $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" );
mp-wp_genesis 22
mp-wp_genesis 23 $redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam;
mp-wp_genesis 24 if ( $post_id )
mp-wp_genesis 25 $redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to );
mp-wp_genesis 26 wp_redirect( $redirect_to );
mp-wp_genesis 27 } elseif ( isset($_REQUEST['delete_comments']) && isset($_REQUEST['action']) && ( -1 != $_REQUEST['action'] || -1 != $_REQUEST['action2'] ) ) {
mp-wp_genesis 28 check_admin_referer('bulk-comments');
mp-wp_genesis 29 $doaction = ( -1 != $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2'];
mp-wp_genesis 30
mp-wp_genesis 31 $deleted = $approved = $unapproved = $spammed = 0;
mp-wp_genesis 32 foreach ( (array) $_REQUEST['delete_comments'] as $comment_id) : // Check the permissions on each
mp-wp_genesis 33 $comment_id = (int) $comment_id;
mp-wp_genesis 34 $_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) );
mp-wp_genesis 35
mp-wp_genesis 36 if ( !current_user_can('edit_post', $_post_id) )
mp-wp_genesis 37 continue;
mp-wp_genesis 38
mp-wp_genesis 39 switch( $doaction ) {
mp-wp_genesis 40 case 'markspam' :
mp-wp_genesis 41 wp_set_comment_status($comment_id, 'spam');
mp-wp_genesis 42 $spammed++;
mp-wp_genesis 43 break;
mp-wp_genesis 44 case 'delete' :
mp-wp_genesis 45 wp_set_comment_status($comment_id, 'delete');
mp-wp_genesis 46 $deleted++;
mp-wp_genesis 47 break;
mp-wp_genesis 48 case 'approve' :
mp-wp_genesis 49 wp_set_comment_status($comment_id, 'approve');
mp-wp_genesis 50 $approved++;
mp-wp_genesis 51 break;
mp-wp_genesis 52 case 'unapprove' :
mp-wp_genesis 53 wp_set_comment_status($comment_id, 'hold');
mp-wp_genesis 54 $unapproved++;
mp-wp_genesis 55 break;
mp-wp_genesis 56 }
mp-wp_genesis 57 endforeach;
mp-wp_genesis 58
mp-wp_genesis 59 $redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved;
mp-wp_genesis 60 if ( $post_id )
mp-wp_genesis 61 $redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to );
mp-wp_genesis 62 if ( isset($_REQUEST['apage']) )
mp-wp_genesis 63 $redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to );
mp-wp_genesis 64 if ( !empty($_REQUEST['mode']) )
mp-wp_genesis 65 $redirect_to = add_query_arg('mode', $_REQUEST['mode'], $redirect_to);
mp-wp_genesis 66 if ( !empty($_REQUEST['comment_status']) )
mp-wp_genesis 67 $redirect_to = add_query_arg('comment_status', $_REQUEST['comment_status'], $redirect_to);
mp-wp_genesis 68 if ( !empty($_REQUEST['s']) )
mp-wp_genesis 69 $redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to);
mp-wp_genesis 70 wp_redirect( $redirect_to );
mp-wp_genesis 71 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
mp-wp_genesis 72 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
mp-wp_genesis 73 exit;
mp-wp_genesis 74 }
mp-wp_genesis 75
mp-wp_genesis 76 if ( $post_id )
mp-wp_genesis 77 $title = sprintf(__('Edit Comments on &#8220;%s&#8221;'), wp_html_excerpt(_draft_or_post_title($post_id), 50));
mp-wp_genesis 78 else
mp-wp_genesis 79 $title = __('Edit Comments');
mp-wp_genesis 80
mp-wp_genesis 81 require_once('admin-header.php');
mp-wp_genesis 82
mp-wp_genesis 83 $mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : attribute_escape($_GET['mode']);
mp-wp_genesis 84
mp-wp_genesis 85 $comment_status = !empty($_GET['comment_status']) ? attribute_escape($_GET['comment_status']) : '';
mp-wp_genesis 86
mp-wp_genesis 87 $comment_type = !empty($_GET['comment_type']) ? attribute_escape($_GET['comment_type']) : '';
mp-wp_genesis 88
mp-wp_genesis 89 $search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : '';
mp-wp_genesis 90 $search = attribute_escape( $search_dirty ); ?>
mp-wp_genesis 91
mp-wp_genesis 92 <div class="wrap">
mp-wp_genesis 93 <?php screen_icon(); ?>
mp-wp_genesis 94 <h2><?php echo wp_specialchars( $title );
mp-wp_genesis 95 if ( isset($_GET['s']) && $_GET['s'] )
mp-wp_genesis 96 printf( '<span class="subtitle">' . sprintf( __( 'Search results for &#8220;%s&#8221;' ), wp_html_excerpt( wp_specialchars( stripslashes( $_GET['s'] ) ), 50 ) ) . '</span>' ); ?>
mp-wp_genesis 97 </h2>
mp-wp_genesis 98
mp-wp_genesis 99 <?php
mp-wp_genesis 100 if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['spam'] ) ) {
mp-wp_genesis 101 $approved = isset( $_GET['approved'] ) ? (int) $_GET['approved'] : 0;
mp-wp_genesis 102 $deleted = isset( $_GET['deleted'] ) ? (int) $_GET['deleted'] : 0;
mp-wp_genesis 103 $spam = isset( $_GET['spam'] ) ? (int) $_GET['spam'] : 0;
mp-wp_genesis 104
mp-wp_genesis 105 if ( $approved > 0 || $deleted > 0 || $spam > 0 ) {
mp-wp_genesis 106 echo '<div id="moderated" class="updated fade"><p>';
mp-wp_genesis 107
mp-wp_genesis 108 if ( $approved > 0 ) {
mp-wp_genesis 109 printf( __ngettext( '%s comment approved', '%s comments approved', $approved ), $approved );
mp-wp_genesis 110 echo '<br />';
mp-wp_genesis 111 }
mp-wp_genesis 112
mp-wp_genesis 113 if ( $deleted > 0 ) {
mp-wp_genesis 114 printf( __ngettext( '%s comment deleted', '%s comments deleted', $deleted ), $deleted );
mp-wp_genesis 115 echo '<br />';
mp-wp_genesis 116 }
mp-wp_genesis 117
mp-wp_genesis 118 if ( $spam > 0 ) {
mp-wp_genesis 119 printf( __ngettext( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam );
mp-wp_genesis 120 echo '<br />';
mp-wp_genesis 121 }
mp-wp_genesis 122
mp-wp_genesis 123 echo '</p></div>';
mp-wp_genesis 124 }
mp-wp_genesis 125 }
mp-wp_genesis 126 ?>
mp-wp_genesis 127
mp-wp_genesis 128 <form id="comments-form" action="" method="get">
mp-wp_genesis 129 <ul class="subsubsub">
mp-wp_genesis 130 <?php
mp-wp_genesis 131 $status_links = array();
mp-wp_genesis 132 $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
mp-wp_genesis 133 //, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
mp-wp_genesis 134 //, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
mp-wp_genesis 135 $stati = array(
mp-wp_genesis 136 'all' => __ngettext_noop('All', 'All'), // singular not used
mp-wp_genesis 137 'moderated' => __ngettext_noop('Pending (<span class="pending-count">%s</span>)', 'Pending (<span class="pending-count">%s</span>)'),
mp-wp_genesis 138 'approved' => __ngettext_noop('Approved', 'Approved'), // singular not used
mp-wp_genesis 139 'spam' => __ngettext_noop('Spam (<span class="spam-count">%s</span>)', 'Spam (<span class="spam-count">%s</span>)')
mp-wp_genesis 140 );
mp-wp_genesis 141 $class = ( '' === $comment_status ) ? ' class="current"' : '';
mp-wp_genesis 142 // $status_links[] = "<li><a href='edit-comments.php'$class>" . __( 'All' ) . '</a>';
mp-wp_genesis 143 $link = 'edit-comments.php';
mp-wp_genesis 144 if ( !empty($comment_type) && 'all' != $comment_type )
mp-wp_genesis 145 $link = add_query_arg( 'comment_type', $comment_type, $link );
mp-wp_genesis 146 foreach ( $stati as $status => $label ) {
mp-wp_genesis 147 $class = '';
mp-wp_genesis 148
mp-wp_genesis 149 if ( str_replace( 'all', '', $status ) == $comment_status )
mp-wp_genesis 150 $class = ' class="current"';
mp-wp_genesis 151 if ( !isset( $num_comments->$status ) )
mp-wp_genesis 152 $num_comments->$status = 10;
mp-wp_genesis 153 if ( 'all' != $status )
mp-wp_genesis 154 $link = add_query_arg( 'comment_status', $status, $link );
mp-wp_genesis 155 if ( $post_id )
mp-wp_genesis 156 $link = add_query_arg( 'p', absint( $post_id ), $link );
mp-wp_genesis 157 /*
mp-wp_genesis 158 // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark
mp-wp_genesis 159 if ( !empty( $_GET['s'] ) )
mp-wp_genesis 160 $link = add_query_arg( 's', attribute_escape( stripslashes( $_GET['s'] ) ), $link );
mp-wp_genesis 161 */
mp-wp_genesis 162 $status_links[] = "<li class='$status'><a href='$link'$class>" . sprintf(
mp-wp_genesis 163 __ngettext( $label[0], $label[1], $num_comments->$status ),
mp-wp_genesis 164 number_format_i18n( $num_comments->$status )
mp-wp_genesis 165 ) . '</a>';
mp-wp_genesis 166 }
mp-wp_genesis 167
mp-wp_genesis 168 $status_links = apply_filters( 'comment_status_links', $status_links );
mp-wp_genesis 169
mp-wp_genesis 170 echo implode( " |</li>\n", $status_links) . '</li>';
mp-wp_genesis 171 unset($status_links);
mp-wp_genesis 172 ?>
mp-wp_genesis 173 </ul>
mp-wp_genesis 174
mp-wp_genesis 175 <p class="search-box">
mp-wp_genesis 176 <label class="hidden" for="comment-search-input"><?php _e( 'Search Comments' ); ?>:</label>
mp-wp_genesis 177 <input type="text" class="search-input" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
mp-wp_genesis 178 <input type="submit" value="<?php _e( 'Search Comments' ); ?>" class="button" />
mp-wp_genesis 179 </p>
mp-wp_genesis 180
mp-wp_genesis 181 <?php
mp-wp_genesis 182 $comments_per_page = apply_filters('comments_per_page', 20, $comment_status);
mp-wp_genesis 183
mp-wp_genesis 184 if ( isset( $_GET['apage'] ) )
mp-wp_genesis 185 $page = abs( (int) $_GET['apage'] );
mp-wp_genesis 186 else
mp-wp_genesis 187 $page = 1;
mp-wp_genesis 188
mp-wp_genesis 189 $start = $offset = ( $page - 1 ) * $comments_per_page;
mp-wp_genesis 190
mp-wp_genesis 191 list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, $comments_per_page + 5, $post_id, $comment_type ); // Grab a few extra
mp-wp_genesis 192
mp-wp_genesis 193 $_comment_post_ids = array();
mp-wp_genesis 194 foreach ( $_comments as $_c ) {
mp-wp_genesis 195 $_comment_post_ids[] = $_c->comment_post_ID;
mp-wp_genesis 196 }
mp-wp_genesis 197 $_comment_pending_count_temp = (array) get_pending_comments_num($_comment_post_ids);
mp-wp_genesis 198 foreach ( (array) $_comment_post_ids as $_cpid )
mp-wp_genesis 199 $_comment_pending_count[$_cpid] = isset( $_comment_pending_count_temp[$_cpid] ) ? $_comment_pending_count_temp[$_cpid] : 0;
mp-wp_genesis 200 if ( empty($_comment_pending_count) )
mp-wp_genesis 201 $_comment_pending_count = array();
mp-wp_genesis 202
mp-wp_genesis 203 $comments = array_slice($_comments, 0, $comments_per_page);
mp-wp_genesis 204 $extra_comments = array_slice($_comments, $comments_per_page);
mp-wp_genesis 205
mp-wp_genesis 206 $page_links = paginate_links( array(
mp-wp_genesis 207 'base' => add_query_arg( 'apage', '%#%' ),
mp-wp_genesis 208 'format' => '',
mp-wp_genesis 209 'prev_text' => __('&laquo;'),
mp-wp_genesis 210 'next_text' => __('&raquo;'),
mp-wp_genesis 211 'total' => ceil($total / $comments_per_page),
mp-wp_genesis 212 'current' => $page
mp-wp_genesis 213 ));
mp-wp_genesis 214
mp-wp_genesis 215 ?>
mp-wp_genesis 216
mp-wp_genesis 217 <input type="hidden" name="mode" value="<?php echo $mode; ?>" />
mp-wp_genesis 218 <?php if ( $post_id ) : ?>
mp-wp_genesis 219 <input type="hidden" name="p" value="<?php echo intval( $post_id ); ?>" />
mp-wp_genesis 220 <?php endif; ?>
mp-wp_genesis 221 <input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" />
mp-wp_genesis 222 <input type="hidden" name="pagegen_timestamp" value="<?php echo current_time('mysql', 1); ?>" />
mp-wp_genesis 223
mp-wp_genesis 224 <div class="tablenav">
mp-wp_genesis 225
mp-wp_genesis 226 <?php if ( $page_links ) : ?>
mp-wp_genesis 227 <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
mp-wp_genesis 228 number_format_i18n( $start + 1 ),
mp-wp_genesis 229 number_format_i18n( min( $page * $comments_per_page, $total ) ),
mp-wp_genesis 230 number_format_i18n( $total ),
mp-wp_genesis 231 $page_links
mp-wp_genesis 232 ); echo $page_links_text; ?></div>
mp-wp_genesis 233 <?php endif; ?>
mp-wp_genesis 234
mp-wp_genesis 235 <div class="alignleft actions">
mp-wp_genesis 236 <select name="action">
mp-wp_genesis 237 <option value="-1" selected="selected"><?php _e('Bulk Actions') ?></option>
mp-wp_genesis 238 <?php if ( empty($comment_status) || 'approved' == $comment_status ): ?>
mp-wp_genesis 239 <option value="unapprove"><?php _e('Unapprove'); ?></option>
mp-wp_genesis 240 <?php endif; ?>
mp-wp_genesis 241 <?php if ( empty($comment_status) || 'moderated' == $comment_status || 'spam' == $comment_status ): ?>
mp-wp_genesis 242 <option value="approve"><?php _e('Approve'); ?></option>
mp-wp_genesis 243 <?php endif; ?>
mp-wp_genesis 244 <?php if ( 'spam' != $comment_status ): ?>
mp-wp_genesis 245 <option value="markspam"><?php _e('Mark as Spam'); ?></option>
mp-wp_genesis 246 <?php endif; ?>
mp-wp_genesis 247 <option value="delete"><?php _e('Delete'); ?></option>
mp-wp_genesis 248 </select>
mp-wp_genesis 249 <input type="submit" name="doaction" id="doaction" value="<?php _e('Apply'); ?>" class="button-secondary apply" />
mp-wp_genesis 250 <?php wp_nonce_field('bulk-comments'); ?>
mp-wp_genesis 251
mp-wp_genesis 252 <?php if ( $comment_status ) echo "<input type='hidden' name='comment_status' value='$comment_status' />\n"; ?>
mp-wp_genesis 253 <select name="comment_type">
mp-wp_genesis 254 <option value="all"><?php _e('Show all comment types'); ?></option>
mp-wp_genesis 255 <?php
mp-wp_genesis 256 $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
mp-wp_genesis 257 'comment' => __('Comments'),
mp-wp_genesis 258 'pings' => __('Pings'),
mp-wp_genesis 259 ) );
mp-wp_genesis 260
mp-wp_genesis 261 foreach ( $comment_types as $type => $label ) {
mp-wp_genesis 262 echo " <option value='$type'";
mp-wp_genesis 263 selected( $comment_type, $type );
mp-wp_genesis 264 echo ">$label</option>\n";
mp-wp_genesis 265 }
mp-wp_genesis 266 ?>
mp-wp_genesis 267 </select>
mp-wp_genesis 268 <input type="submit" id="post-query-submit" value="<?php _e('Filter'); ?>" class="button-secondary" />
mp-wp_genesis 269
mp-wp_genesis 270 <?php if ( isset($_GET['apage']) ) { ?>
mp-wp_genesis 271 <input type="hidden" name="apage" value="<?php echo absint( $_GET['apage'] ); ?>" />
mp-wp_genesis 272 <?php }
mp-wp_genesis 273
mp-wp_genesis 274 if ( 'spam' == $comment_status ) {
mp-wp_genesis 275 wp_nonce_field('bulk-spam-delete', '_spam_nonce'); ?>
mp-wp_genesis 276 <input type="submit" name="delete_all_spam" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" />
mp-wp_genesis 277 <?php } ?>
mp-wp_genesis 278 <?php do_action('manage_comments_nav', $comment_status); ?>
mp-wp_genesis 279 </div>
mp-wp_genesis 280
mp-wp_genesis 281 <br class="clear" />
mp-wp_genesis 282
mp-wp_genesis 283 </div>
mp-wp_genesis 284
mp-wp_genesis 285 <div class="clear"></div>
mp-wp_genesis 286
mp-wp_genesis 287 <?php if ( $comments ) { ?>
mp-wp_genesis 288 <table class="widefat comments fixed" cellspacing="0">
mp-wp_genesis 289 <thead>
mp-wp_genesis 290 <tr>
mp-wp_genesis 291 <?php print_column_headers('edit-comments'); ?>
mp-wp_genesis 292 </tr>
mp-wp_genesis 293 </thead>
mp-wp_genesis 294
mp-wp_genesis 295 <tfoot>
mp-wp_genesis 296 <tr>
mp-wp_genesis 297 <?php print_column_headers('edit-comments', false); ?>
mp-wp_genesis 298 </tr>
mp-wp_genesis 299 </tfoot>
mp-wp_genesis 300
mp-wp_genesis 301 <tbody id="the-comment-list" class="list:comment">
mp-wp_genesis 302 <?php
mp-wp_genesis 303 foreach ($comments as $comment)
mp-wp_genesis 304 _wp_comment_row( $comment->comment_ID, $mode, $comment_status );
mp-wp_genesis 305 ?>
mp-wp_genesis 306 </tbody>
mp-wp_genesis 307 <tbody id="the-extra-comment-list" class="list:comment" style="display: none;">
mp-wp_genesis 308 <?php
mp-wp_genesis 309 foreach ($extra_comments as $comment)
mp-wp_genesis 310 _wp_comment_row( $comment->comment_ID, $mode, $comment_status );
mp-wp_genesis 311 ?>
mp-wp_genesis 312 </tbody>
mp-wp_genesis 313 </table>
mp-wp_genesis 314
mp-wp_genesis 315 <div class="tablenav">
mp-wp_genesis 316 <?php
mp-wp_genesis 317 if ( $page_links )
mp-wp_genesis 318 echo "<div class='tablenav-pages'>$page_links_text</div>";
mp-wp_genesis 319 ?>
mp-wp_genesis 320
mp-wp_genesis 321 <div class="alignleft actions">
mp-wp_genesis 322 <select name="action2">
mp-wp_genesis 323 <option value="-1" selected="selected"><?php _e('Bulk Actions') ?></option>
mp-wp_genesis 324 <?php if ( empty($comment_status) || 'approved' == $comment_status ): ?>
mp-wp_genesis 325 <option value="unapprove"><?php _e('Unapprove'); ?></option>
mp-wp_genesis 326 <?php endif; ?>
mp-wp_genesis 327 <?php if ( empty($comment_status) || 'moderated' == $comment_status ): ?>
mp-wp_genesis 328 <option value="approve"><?php _e('Approve'); ?></option>
mp-wp_genesis 329 <?php endif; ?>
mp-wp_genesis 330 <?php if ( 'spam' != $comment_status ): ?>
mp-wp_genesis 331 <option value="markspam"><?php _e('Mark as Spam'); ?></option>
mp-wp_genesis 332 <?php endif; ?>
mp-wp_genesis 333 <option value="delete"><?php _e('Delete'); ?></option>
mp-wp_genesis 334 </select>
mp-wp_genesis 335 <input type="submit" name="doaction2" id="doaction2" value="<?php _e('Apply'); ?>" class="button-secondary apply" />
mp-wp_genesis 336
mp-wp_genesis 337 <?php if ( 'spam' == $comment_status ) { ?>
mp-wp_genesis 338 <input type="submit" name="delete_all_spam2" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" />
mp-wp_genesis 339 <?php } ?>
mp-wp_genesis 340 <?php do_action('manage_comments_nav', $comment_status); ?>
mp-wp_genesis 341 </div>
mp-wp_genesis 342
mp-wp_genesis 343 <br class="clear" />
mp-wp_genesis 344 </div>
mp-wp_genesis 345
mp-wp_genesis 346 </form>
mp-wp_genesis 347
mp-wp_genesis 348 <form id="get-extra-comments" method="post" action="" class="add:the-extra-comment-list:" style="display: none;">
mp-wp_genesis 349 <input type="hidden" name="s" value="<?php echo $search; ?>" />
mp-wp_genesis 350 <input type="hidden" name="mode" value="<?php echo $mode; ?>" />
mp-wp_genesis 351 <input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" />
mp-wp_genesis 352 <input type="hidden" name="page" value="<?php echo isset($_REQUEST['page']) ? absint( $_REQUEST['page'] ) : 1; ?>" />
mp-wp_genesis 353 <input type="hidden" name="p" value="<?php echo attribute_escape( $post_id ); ?>" />
mp-wp_genesis 354 <input type="hidden" name="comment_type" value="<?php echo attribute_escape( $comment_type ); ?>" />
mp-wp_genesis 355 <?php wp_nonce_field( 'add-comment', '_ajax_nonce', false ); ?>
mp-wp_genesis 356 </form>
mp-wp_genesis 357
mp-wp_genesis 358 <div id="ajax-response"></div>
mp-wp_genesis 359
mp-wp_genesis 360 <?php } elseif ( 'moderated' == $_GET['comment_status'] ) { ?>
mp-wp_genesis 361 <p><?php _e('No comments awaiting moderation&hellip; yet.') ?></p>
mp-wp_genesis 362 </form>
mp-wp_genesis 363
mp-wp_genesis 364 <?php } else { ?>
mp-wp_genesis 365 <p><?php _e('No results found.') ?></p>
mp-wp_genesis 366 </form>
mp-wp_genesis 367
mp-wp_genesis 368 <?php } ?>
mp-wp_genesis 369 </div>
mp-wp_genesis 370
mp-wp_genesis 371 <script type="text/javascript">
mp-wp_genesis 372 /* <![CDATA[ */
mp-wp_genesis 373 (function($){
mp-wp_genesis 374 $(document).ready(function(){
mp-wp_genesis 375 $('#doaction, #doaction2').click(function(){
mp-wp_genesis 376 if ( $('select[name^="action"]').val() == 'delete' ) {
mp-wp_genesis 377 var m = '<?php echo js_escape(__("You are about to delete the selected comments.\n 'Cancel' to stop, 'OK' to delete.")); ?>';
mp-wp_genesis 378 return showNotice.warn(m);
mp-wp_genesis 379 }
mp-wp_genesis 380 });
mp-wp_genesis 381 });
mp-wp_genesis 382 })(jQuery);
mp-wp_genesis 383 /* ]]> */
mp-wp_genesis 384 </script>
mp-wp_genesis 385
mp-wp_genesis 386 <?php
mp-wp_genesis 387 wp_comment_reply('-1', true, 'detail');
mp-wp_genesis 388 include('admin-footer.php'); ?>