- Timestamp:
- 01/11/2017 01:31:57 AM (8 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-screen.php
r39600 r39760 916 916 switch ( $this->base ) { 917 917 case 'widgets': 918 $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n"; 918 $nonce = wp_create_nonce( 'widgets-access' ); 919 $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __('Disable accessibility mode') . "</a></p>\n"; 919 920 break; 920 921 case 'post' : -
trunk/src/wp-admin/widgets.php
r39541 r39760 23 23 $widgets_access = get_user_setting( 'widgets_access' ); 24 24 if ( isset($_GET['widgets-access']) ) { 25 check_admin_referer( 'widgets-access' ); 26 25 27 $widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off'; 26 28 set_user_setting( 'widgets_access', $widgets_access );
Note: See TracChangeset
for help on using the changeset viewer.