From 189e5449a3b1f4c259f2c81adeeeb4d63d4c4c93 Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Wed, 11 Jan 2017 01:40:34 +0000 Subject: [PATCH] Add nonce for widget accessibility mode. Props vortfu. See #23328. Merges [39760] to 4.7 branch. Built from https://develop.svn.wordpress.org/branches/4.7@39761 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39699 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-screen.php | 3 ++- wp-admin/widgets.php | 2 ++ wp-includes/version.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-screen.php b/wp-admin/includes/class-wp-screen.php index a7d9a1a5c3..967875917c 100644 --- a/wp-admin/includes/class-wp-screen.php +++ b/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 = '