From 116f59af6039f50bc11145c5fd842716a736d6d4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 21 Oct 2015 08:14:24 +0000 Subject: [PATCH] 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 --- wp-includes/rest-api/rest-functions.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/rest-api/rest-functions.php b/wp-includes/rest-api/rest-functions.php index ae8f123b53..d0e7cc0f99 100644 --- a/wp-includes/rest-api/rest-functions.php +++ b/wp-includes/rest-api/rest-functions.php @@ -575,8 +575,8 @@ function rest_cookie_check_errors( $result ) { // Determine if there is a nonce. $nonce = null; - if ( isset( $_REQUEST['_wp_rest_nonce'] ) ) { - $nonce = $_REQUEST['_wp_rest_nonce']; + if ( isset( $_REQUEST['_wpnonce'] ) ) { + $nonce = $_REQUEST['_wpnonce']; } elseif ( isset( $_SERVER['HTTP_X_WP_NONCE'] ) ) { $nonce = $_SERVER['HTTP_X_WP_NONCE']; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 473cfc3027..75aa255351 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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.