_oembed_rest_pre_serve_request


_oembed_rest_pre_serve_request ( $served, $result, $request, $server )

Access:
  • private
Parameters:
  • (bool) served Whether the request has already been served.
  • (WP_HTTP_Response) result Result to send to the client. Usually a `WP_REST_Response`.
  • (WP_REST_Request) request Request used to generate the response.
  • (WP_REST_Server) server Server instance.
Returns:
  • (true)
Defined at:

Description

Hooks into the REST API output to print XML instead of JSON.This is only done for the oEmbed API endpoint, which supports both formats.

Related Functions

rest_ensure_request, wp_oembed_register_route, rest_parse_request_arg, wp_create_user_request, rest_preload_api_request

Top Google Results

User discussions

wpseek mobile