mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
REST API: remove unnecessary variable assignments in rest_handle_options_request().
See #37771. git-svn-id: https://develop.svn.wordpress.org/trunk@38310 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user