From be45faec7414fa26f3aed299b4e032a8a4fc1ea9 Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Wed, 11 Jan 2017 01:50:26 +0000 Subject: [PATCH] Add nonce for widget accessibility mode. Props vortfu. See #23328. Merges [39765] to 4.1 branch. Built from https://develop.svn.wordpress.org/branches/4.1@39767 git-svn-id: http://core.svn.wordpress.org/branches/4.1@39705 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/screen.php | 3 ++- wp-admin/widgets.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php index 0482d783e0..883a9a798e 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -970,7 +970,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 = '