]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/edit-comments.php
WordPress 3.5.1
[autoinstalls/wordpress.git] / wp-admin / edit-comments.php
index 40ef4a4dc9db6d70485479ab4719c371ca5aeaaf..174cd9af114be3389f69a6872342fcf362b093e2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Edit Comments Administration Panel.
+ * Edit Comments Administration Screen.
  *
  * @package WordPress
  * @subpackage Administration
@@ -30,7 +30,7 @@ if ( $doaction ) {
        } elseif ( isset( $_REQUEST['ids'] ) ) {
                $comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) );
        } elseif ( wp_get_referer() ) {
-               wp_redirect( wp_get_referer() );
+               wp_safe_redirect( wp_get_referer() );
                exit;
        }
 
@@ -92,7 +92,7 @@ if ( $doaction ) {
        if ( $trashed || $spammed )
                $redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to );
 
-       wp_redirect( $redirect_to );
+       wp_safe_redirect( $redirect_to );
        exit;
 } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
         wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), stripslashes( $_SERVER['REQUEST_URI'] ) ) );
@@ -101,12 +101,6 @@ if ( $doaction ) {
 
 $wp_list_table->prepare_items();
 
-$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
-if ( $pagenum > $total_pages && $total_pages > 0 ) {
-       wp_redirect( add_query_arg( 'paged', $total_pages ) );
-       exit;
-}
-
 wp_enqueue_script('admin-comments');
 enqueue_comment_hotkeys_js();
 
@@ -117,18 +111,31 @@ else
 
 add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) );
 
-add_contextual_help( $current_screen, '<p>' . __( 'You can manage comments made on your site similar to the way you manage Posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>' .
-       '<p>' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '</p>' .
-       '<p>' . __( 'In the Author column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
-       '<p>' . __( 'In the Comment column, above each comment it says &#8220;Submitted on,&#8221; followed by the date and time the comment was left on your site. Clicking on the date/time link will take you to that comment on your live site.' ) . '</p>' .
-       '<p>' . __( 'In the In Response To column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The &#8220;#&#8221; permalink symbol below leads to that post on your live site. The small bubble with the number in it shows how many comments that post has received. If the bubble is gray, you have moderated all comments for that post. If it is blue, there are pending comments. Clicking the bubble will filter the comments screen to show only comments on that post.' ) . '</p>' .
-       '<p>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link below to learn more.' ) . '</p>' .
+get_current_screen()->add_help_tab( array(
+'id'           => 'overview',
+'title'                => __('Overview'),
+'content'      =>
+       '<p>' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>'
+) );
+get_current_screen()->add_help_tab( array(
+'id'           => 'moderating-comments',
+'title'                => __('Moderating Comments'),
+'content'      =>
+               '<p>' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '</p>' .
+               '<p>' . __( 'In the <strong>Author</strong> column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
+               '<p>' . __( 'In the <strong>Comment</strong> column, above each comment it says &#8220;Submitted on,&#8221; followed by the date and time the comment was left on your site. Clicking on the date/time link will take you to that comment on your live site. Hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '</p>' .
+               '<p>' . __( 'In the <strong>In Response To</strong> column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows the number of approved comments that post has received. If the bubble is gray, you have moderated all comments for that post. If it is blue, there are pending comments. Clicking the bubble will filter the comments screen to show only comments on that post.' ) . '</p>' .
+               '<p>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '</p>'
+) );
+
+get_current_screen()->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="http://codex.wordpress.org/Administration_Panels#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
+       '<p>' . __( '<a href="http://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
        '<p>' . __( '<a href="http://codex.wordpress.org/Comment_Spam" target="_blank">Documentation on Comment Spam</a>' ) . '</p>' .
        '<p>' . __( '<a href="http://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">Documentation on Keyboard Shortcuts</a>' ) . '</p>' .
        '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
 );
+
 require_once('./admin-header.php');
 ?>