mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user