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
This commit is contained in:
Sergey Biryukov 2015-09-02 18:04:21 +00:00
parent 31b0fe4b6f
commit d2919e2d71
2 changed files with 8 additions and 3 deletions

View File

@ -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(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit comments.' ) . '</p>',
403
);
}
$wp_list_table = _get_list_table('WP_Comments_List_Table');
$pagenum = $wp_list_table->get_pagenum();

View File

@ -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.