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
This commit is contained in:
parent
ca9f71e9b2
commit
863505cf81
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue