X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/784f914b1e4b1c62d6657e86397c2e83bcee4295..refs/heads/pristine:/wp-admin/edit-comments.php diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index f5448ab3..a33f986b 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -11,7 +11,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_die( '

' . __( 'Cheatin’ uh?' ) . '

' . - '

' . __( 'You are not allowed to edit comments.' ) . '

', + '

' . __( 'Sorry, you are not allowed to edit comments.' ) . '

', 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( '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Comments' ) . '

' . - '

' . __( 'Documentation on Comment Spam' ) . '

' . - '

' . __( 'Documentation on Keyboard Shortcuts' ) . '

' . - '

' . __( 'Support Forums' ) . '

' + '

' . __( 'Documentation on Comments' ) . '

' . + '

' . __( 'Documentation on Comment Spam' ) . '

' . + '

' . __( 'Documentation on Keyboard Shortcuts' ) . '

' . + '

' . __( 'Support Forums' ) . '

' ); 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 )