Make WordPress Core


Ignore:
Timestamp:
01/11/2017 01:48:22 AM (9 years ago)
Author:
aaroncampbell
Message:

Add nonce for widget accessibility mode.

Props vortfu.

See #23328.

Merges [39765] to 4.2 branch.

Location:
branches/4.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/4.2/src/wp-admin/includes/screen.php

    r31696 r39766  
    972972        switch ( $this->base ) {
    973973            case 'widgets':
    974                 $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";
     974                $nonce = wp_create_nonce( 'widgets-access' );
     975                $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";
    975976                break;
    976977            case 'post' :
Note: See TracChangeset for help on using the changeset viewer.