From 778d794e4f31a4b7caf20ae92389e112b5470cb6 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 22 Aug 2016 20:56:28 +0000 Subject: [PATCH] REST API: remove unnecessary variable assignments in `rest_handle_options_request()`. See #37771. Built from https://develop.svn.wordpress.org/trunk@38310 git-svn-id: http://core.svn.wordpress.org/trunk@38251 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api.php | 4 +--- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index 13bfa596ec..0eee75c772 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -421,10 +421,8 @@ function rest_handle_options_request( $response, $handler, $request ) { $response = new WP_REST_Response(); $data = array(); - $accept = array(); - foreach ( $handler->get_routes() as $route => $endpoints ) { - $match = preg_match( '@^' . $route . '$@i', $request->get_route(), $args ); + $match = preg_match( '@^' . $route . '$@i', $request->get_route() ); if ( ! $match ) { continue; diff --git a/wp-includes/version.php b/wp-includes/version.php index 30f721231a..6389faa296 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38309'; +$wp_version = '4.7-alpha-38310'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.