Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/press-this.php
.
props ericlewis, kraftbj, lukecarbis, mrmist. fixes #33676. see #14530. git-svn-id: https://develop.svn.wordpress.org/trunk@33865 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
89fca37568
commit
45237109dc
@ -11,8 +11,13 @@ define('IFRAME_REQUEST' , true);
|
|||||||
/** WordPress Administration Bootstrap */
|
/** WordPress Administration Bootstrap */
|
||||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||||
|
|
||||||
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) )
|
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
|
||||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
wp_die(
|
||||||
|
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
||||||
|
'<p>' . __( 'You are not allowed to create posts as this user.' ) . '</p>',
|
||||||
|
403
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @global WP_Press_This $wp_press_this
|
* @global WP_Press_This $wp_press_this
|
||||||
|
Loading…
Reference in New Issue
Block a user