Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.

Fixes #10551
Props nacin

Built from https://develop.svn.wordpress.org/trunk@30356


git-svn-id: http://core.svn.wordpress.org/trunk@30355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn
2014-11-16 06:16:22 +00:00
parent 5f30f13780
commit d88ed475b0
17 changed files with 31 additions and 32 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
require_once(ABSPATH . 'wp-admin/includes/widgets.php');
if ( ! current_user_can('edit_theme_options') )
wp_die( __( 'Cheatin’ uh?' ));
wp_die( __( 'Cheatin’ uh?' ), 403 );
$widgets_access = get_user_setting( 'widgets_access' );
if ( isset($_GET['widgets-access']) ) {