From 5ceecc4eaf2dc4995c215ef3e9116a2fe2429043 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 2 Sep 2015 18:21:21 +0000 Subject: [PATCH] Provide more helpful feedback than just "Cheatin' uh?" for permission errors in `wp-admin/nav-menus.php`. props ericlewis, kraftbj, lukecarbis, mrmist. fixes #33673. see #14530. Built from https://develop.svn.wordpress.org/trunk@33862 git-svn-id: http://core.svn.wordpress.org/trunk@33830 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/nav-menus.php | 9 +++++++-- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index c5fde9044a..941951356d 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -19,8 +19,13 @@ if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets' wp_die( __( 'Your theme does not support navigation menus or widgets.' ) ); // Permissions Check -if ( ! current_user_can('edit_theme_options') ) - wp_die( __( 'Cheatin’ uh?' ), 403 ); +if ( ! current_user_can( 'edit_theme_options' ) ) { + wp_die( + '

' . __( 'Cheatin’ uh?' ) . '

' . + '

' . __( 'You are not allowed to edit theme options on this site.' ) . '

', + 403 + ); +} wp_enqueue_script( 'nav-menu' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 854575fd0a..c0b699b442 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33861'; +$wp_version = '4.4-alpha-33862'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.