From e31e6996633043a1170ece7828b86f9dfa67c782 Mon Sep 17 00:00:00 2001 From: "Aaron D. Campbell" Date: Wed, 11 Jan 2017 01:44:36 +0000 Subject: [PATCH] Add nonce for widget accessibility mode. Props vortfu. See #23328. Merges [39760] to 4.4 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.4@39764 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-screen.php | 3 ++- src/wp-admin/widgets.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php index 5910c75024..ffdfa4f52b 100644 --- a/src/wp-admin/includes/class-wp-screen.php +++ b/src/wp-admin/includes/class-wp-screen.php @@ -915,7 +915,8 @@ final class WP_Screen { switch ( $this->base ) { case 'widgets': - $this->_screen_settings = '

' . __('Enable accessibility mode') . '' . __('Disable accessibility mode') . "

\n"; + $nonce = wp_create_nonce( 'widgets-access' ); + $this->_screen_settings = '

' . __('Enable accessibility mode') . '' . __('Disable accessibility mode') . "

\n"; break; case 'post' : $expand = '