_oembed_rest_pre_serve_request

Private AccessPrivate Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

SummerySummery

Hooks into the REST API output to print XML instead of JSON.

Syntax

_oembed_rest_pre_serve_request( bool $served, WP_HTTP_ResponseInterface $result, WP_REST_Request $request, WP_REST_Server $server )

DescriptionDescription

This is only done for the oEmbed API endpoint, which supports both formats.

ParametersParameters

$served

(bool) (Required) Whether the request has already been served.

$result

(WP_HTTP_ResponseInterface) (Required) Result to send to the client. Usually a WP_REST_Response.

$request

(WP_REST_Request) (Required) Request used to generate the response.

$server

(WP_REST_Server) (Required) Server instance.

ReturnReturn

(true)

SourceSource

File: wp-includes/embed.php


			

ChangelogChangelog

Changelog
Version Description
4.4.0 Introduced.
Scroll to Top