REST API: Change nonce name to `_wpnonce`.
It's shorter and is compatible with the default name in `wp_nonce_field()`. Props danielbachhuber. Fixes #34375. Built from https://develop.svn.wordpress.org/trunk@35323 git-svn-id: http://core.svn.wordpress.org/trunk@35289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da157f16b1
commit
116f59af60
|
@ -575,8 +575,8 @@ function rest_cookie_check_errors( $result ) {
|
||||||
// Determine if there is a nonce.
|
// Determine if there is a nonce.
|
||||||
$nonce = null;
|
$nonce = null;
|
||||||
|
|
||||||
if ( isset( $_REQUEST['_wp_rest_nonce'] ) ) {
|
if ( isset( $_REQUEST['_wpnonce'] ) ) {
|
||||||
$nonce = $_REQUEST['_wp_rest_nonce'];
|
$nonce = $_REQUEST['_wpnonce'];
|
||||||
} elseif ( isset( $_SERVER['HTTP_X_WP_NONCE'] ) ) {
|
} elseif ( isset( $_SERVER['HTTP_X_WP_NONCE'] ) ) {
|
||||||
$nonce = $_SERVER['HTTP_X_WP_NONCE'];
|
$nonce = $_SERVER['HTTP_X_WP_NONCE'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-35322';
|
$wp_version = '4.4-alpha-35323';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue