Add nonce for widget accessibility mode.

Props vortfu.

See #23328.



git-svn-id: https://develop.svn.wordpress.org/trunk@39760 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron D. Campbell
2017-01-11 01:31:57 +00:00
parent b1b4d49264
commit 506a4c55f8
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -22,6 +22,8 @@ if ( ! current_user_can( 'edit_theme_options' ) ) {
$widgets_access = get_user_setting( 'widgets_access' );
if ( isset($_GET['widgets-access']) ) {
check_admin_referer( 'widgets-access' );
$widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off';
set_user_setting( 'widgets_access', $widgets_access );
}