Ticket #14841: edit-comments.diff
File edit-comments.diff, 1.7 KB (added by , 15 years ago) |
---|
-
wp-admin/edit-comments.php
15 15 wp_enqueue_script('admin-comments'); 16 16 enqueue_comment_hotkeys_js(); 17 17 18 $search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : ''; 19 $search = esc_attr( $search_dirty ); 20 21 // Comments search is global, so if this is a search remove the post id 22 if ( !empty($search_dirty) ) { 23 $_SERVER['REQUEST_URI'] = remove_query_arg('p', $_SERVER['REQUEST_URI']); 24 unset($_REQUEST['p']); 25 } 26 18 27 $post_id = isset($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0; 19 28 20 29 if ( isset($_REQUEST['doaction']) || isset($_REQUEST['doaction2']) || isset($_REQUEST['delete_all']) || isset($_REQUEST['delete_all2']) ) { … … 100 109 exit; 101 110 } 102 111 103 if ( $post_id )112 if ( $post_id && empty($search_dirty) ) 104 113 $title = sprintf(__('Comments on “%s”'), wp_html_excerpt(_draft_or_post_title($post_id), 50)); 105 114 else 106 115 $title = __('Comments'); … … 127 136 128 137 $comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : ''; 129 138 130 $search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : ''; 131 $search = esc_attr( $search_dirty ); ?> 139 ?> 132 140 133 141 <div class="wrap"> 134 142 <?php screen_icon(); ?> … … 243 251 $translated_label = _nx( $label[0], $label[1], $num_comments->$status, $label[2] ); 244 252 else 245 253 $translated_label = _n( $label[0], $label[1], $num_comments->$status ); 246 $status_links[] = "<li class='$status'><a href='$link'$class>" . sprintf( 254 $status_links[] = "<li class='$status'><a href='$link'$class>" . sprintf( 247 255 $translated_label, 248 256 number_format_i18n( $num_comments->$status ) 249 257 ) . '</a>';