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:
parent
31b0fe4b6f
commit
d2919e2d71
|
@ -8,8 +8,13 @@
|
||||||
|
|
||||||
/** WordPress Administration Bootstrap */
|
/** WordPress Administration Bootstrap */
|
||||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||||
if ( !current_user_can('edit_posts') )
|
if ( ! current_user_can( 'edit_posts' ) ) {
|
||||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
wp_die(
|
||||||
|
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
||||||
|
'<p>' . __( 'You are not allowed to edit comments.' ) . '</p>',
|
||||||
|
403
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$wp_list_table = _get_list_table('WP_Comments_List_Table');
|
$wp_list_table = _get_list_table('WP_Comments_List_Table');
|
||||||
$pagenum = $wp_list_table->get_pagenum();
|
$pagenum = $wp_list_table->get_pagenum();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue