From d2919e2d7150d24217833f5ad561ed21a9f9ff27 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 2 Sep 2015 18:04:21 +0000 Subject: [PATCH] Provide more helpful feedback than just "Cheatin' uh?" for permission errors in `wp-admin/edit-comments.php`. props ericlewis, kraftbj, lukecarbis, mrmist. fixes #33669. see #14530. Built from https://develop.svn.wordpress.org/trunk@33860 git-svn-id: http://core.svn.wordpress.org/trunk@33828 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-comments.php | 9 +++++++-- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 05e0b2fda0..48dd6a4cd2 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -8,8 +8,13 @@ /** WordPress Administration Bootstrap */ require_once( dirname( __FILE__ ) . '/admin.php' ); -if ( !current_user_can('edit_posts') ) - wp_die( __( 'Cheatin’ uh?' ), 403 ); +if ( ! current_user_can( 'edit_posts' ) ) { + wp_die( + '

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

' . + '

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

', + 403 + ); +} $wp_list_table = _get_list_table('WP_Comments_List_Table'); $pagenum = $wp_list_table->get_pagenum(); diff --git a/wp-includes/version.php b/wp-includes/version.php index d78a4cbf7b..41306e967d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33859'; +$wp_version = '4.4-alpha-33860'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.