]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/edit-comments.php
WordPress 4.7.1-scripts
[autoinstalls/wordpress.git] / wp-admin / edit-comments.php
index f5448ab349855c71c01e28ced615673177a4861d..a33f986b3008c5b7e7a70ddb791f936eb31f5793 100644 (file)
@@ -11,7 +11,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 if ( ! current_user_can( 'edit_posts' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit comments.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit comments.' ) . '</p>',
                403
        );
 }
@@ -82,6 +82,22 @@ if ( $doaction ) {
                }
        }
 
+       if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) {
+               /**
+                * Fires when a custom bulk action should be handled.
+                *
+                * The redirect link should be modified with success or failure feedback
+                * from the action to be used to display feedback to the user.
+                *
+                * @since 4.7.0
+                *
+                * @param string $redirect_url The redirect URL.
+                * @param string $doaction     The action being taken.
+                * @param array  $items        The items to take the action on.
+                */
+               $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $comment_ids );
+       }
+
        wp_defer_comment_counting( false );
 
        if ( $approved )
@@ -162,10 +178,10 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Comment_Spam" target="_blank">Documentation on Comment Spam</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">Documentation on Keyboard Shortcuts</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments">Documentation on Comments</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://codex.wordpress.org/Comment_Spam">Documentation on Comment Spam</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts">Documentation on Keyboard Shortcuts</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -210,7 +226,7 @@ if ( isset( $_REQUEST['error'] ) ) {
                        $error_msg = __( 'Invalid comment ID.' );
                        break;
                case 2 :
-                       $error_msg = __( 'You are not allowed to edit comments on this post.' );
+                       $error_msg = __( 'Sorry, you are not allowed to edit comments on this post.' );
                        break;
        }
        if ( $error_msg )