From 863505cf81ad01d56a67aa9710fd597367a22771 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 21 Nov 2016 05:46:30 +0000 Subject: [PATCH] REST API: Trim trailing slashes from routes. WordPress' rewrites do this usually, but the behaviour was inconsistent when using non-pretty permalinks. Props joehoyle. Fixes #38873. Built from https://develop.svn.wordpress.org/trunk@39329 git-svn-id: http://core.svn.wordpress.org/trunk@39269 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index ffc691916f..3d0b7ee6d5 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -256,7 +256,7 @@ function rest_api_loaded() { $server = rest_get_server(); // Fire off the request. - $server->serve_request( $GLOBALS['wp']->query_vars['rest_route'] ); + $server->serve_request( untrailingslashit( $GLOBALS['wp']->query_vars['rest_route'] ) ); // We're done. die(); diff --git a/wp-includes/version.php b/wp-includes/version.php index efabfb9cd9..4421afa041 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta4-39328'; +$wp_version = '4.7-beta4-39329'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.