WordPress.org

Make WordPress Core

Ticket #35628: 35628.1.diff

File 35628.1.diff, 665 bytes (added by danielbachhuber, 6 years ago)
  • src/wp-includes/rest-api/class-wp-rest-server.php

    diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php
    index dad4070..3af2f64 100644
    a b class WP_REST_Server { 
    541541                                $request->set_query_params( $query_params );
    542542                                $response = $this->dispatch( $request );
    543543
     544                                /** This filter is documented in wp-includes/rest-api/class-wp-rest-server.php */
     545                                $response = apply_filters( 'rest_post_dispatch', rest_ensure_response( $response ), $this, $request );
     546
    544547                                $embeds[] = $this->response_to_data( $response, false );
    545548                        }
    546549