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.