From 9f4a883e2f344e6d4b3fb380f1833cad964e945c Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Wed, 11 Jan 2017 01:49:32 +0000 Subject: [PATCH] Add nonce for widget accessibility mode. Props vortfu. See #23328. Merges [39765] to 4.2 branch. Built from https://develop.svn.wordpress.org/branches/4.2@39766 git-svn-id: http://core.svn.wordpress.org/branches/4.2@39704 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 3572446d89..3add95e2ee 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -971,7 +971,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 = '