From 1ef0a5514eb674a3538442ea944763bf3b82a7dc Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 30 Oct 2016 17:42:45 +0000 Subject: [PATCH] REST: Fix a yoda condition in `WP_REST_Request::get_parameter_order()` and add a missing period for an inline comment in `WP_REST_Request::from_url(). Props mrahmadawais. See #38398. Built from https://develop.svn.wordpress.org/trunk@39027 git-svn-id: http://core.svn.wordpress.org/trunk@38969 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api/class-wp-rest-request.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/rest-api/class-wp-rest-request.php b/wp-includes/rest-api/class-wp-rest-request.php index 15c4728941..9c5410a0ec 100644 --- a/wp-includes/rest-api/class-wp-rest-request.php +++ b/wp-includes/rest-api/class-wp-rest-request.php @@ -359,7 +359,8 @@ class WP_REST_Request implements ArrayAccess { // Ensure we parse the body data. $body = $this->get_body(); - if ( $this->method !== 'POST' && ! empty( $body ) ) { + + if ( 'POST' !== $this->method && ! empty( $body ) ) { $this->parse_body_params(); } @@ -967,7 +968,7 @@ class WP_REST_Request implements ArrayAccess { $api_root = rest_url(); if ( get_option( 'permalink_structure' ) && 0 === strpos( $url, $api_root ) ) { - // Pretty permalinks on, and URL is under the API root + // Pretty permalinks on, and URL is under the API root. $api_url_part = substr( $url, strlen( untrailingslashit( $api_root ) ) ); $route = parse_url( $api_url_part, PHP_URL_PATH ); } elseif ( ! empty( $query_params['rest_route'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 093e8a0f34..20cba0820c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta1-39026'; +$wp_version = '4.7-beta1-39027'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.