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. git-svn-id: https://develop.svn.wordpress.org/trunk@33860 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a505ad3382
commit
0299c00fbb
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user