Make WordPress Core

Ticket #35507: 35507.diff

File 35507.diff, 1.1 KB (added by rmccue, 9 years ago)
  • wp-includes/rest-api/class-wp-rest-server.php

    diff --git wp-includes/rest-api/class-wp-rest-server.php wp-includes/rest-api/class-wp-rest-server.php
    index dad4070..5a0580e 100644
    class WP_REST_Server { 
    848848                                         * Allow plugins to override dispatching the request.
    849849                                         *
    850850                                         * @since 4.4.0
     851                                         * @since 4.5.0 $route and $handler parameters added.
    851852                                         *
    852853                                         * @param bool            $dispatch_result Dispatch result, will be used if not empty.
    853854                                         * @param WP_REST_Request $request         Request used to generate the response.
     855                                         * @param string          $route           Route matched for the request.
     856                                         * @param array           $handler         Route handler used for the request.
    854857                                         */
    855                                         $dispatch_result = apply_filters( 'rest_dispatch_request', null, $request );
     858                                        $dispatch_result = apply_filters( 'rest_dispatch_request', null, $request, $route, $handler );
    856859
    857860                                        // Allow plugins to halt the request via this filter.
    858861                                        if ( null !== $dispatch_result ) {