_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_ResponseInterface) $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, get_oembed_response_data, rest_do_request

Top Google Results

User discussions

wpseek mobile