Provide more helpful feedback than just "Cheatin' uh?" for permission errors in `wp-admin/customize.php`.
props ericlewis, kraftbj, lukecarbis, mrmist. fixes #33668. see #14530. Built from https://develop.svn.wordpress.org/trunk@33857 git-svn-id: http://core.svn.wordpress.org/trunk@33825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f35c176426
commit
3d1c08a1a5
|
@ -13,7 +13,11 @@ define( 'IFRAME_REQUEST', true );
|
||||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||||
|
|
||||||
if ( ! current_user_can( 'customize' ) ) {
|
if ( ! current_user_can( 'customize' ) ) {
|
||||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
wp_die(
|
||||||
|
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
||||||
|
'<p>' . __( 'You are not allowed to customize the appearance of this site.' ) . '</p>',
|
||||||
|
403
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
wp_reset_vars( array( 'url', 'return' ) );
|
wp_reset_vars( array( 'url', 'return' ) );
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-33856';
|
$wp_version = '4.4-alpha-33857';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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