wp_filter_pre_oembed_result

SummerySummery

Filters the oEmbed result before any HTTP requests are made.

Syntax

wp_filter_pre_oembed_result( null|string $result, string $url, array $args )

DescriptionDescription

If the URL belongs to the current site, the result is fetched directly instead of going through the oEmbed discovery process.

ParametersParameters

$result

(null|string) (Required) The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. Default null.

$url

(string) (Required) The URL that should be inspected for discovery <link> tags.

$args

(array) (Required) oEmbed remote get arguments.

ReturnReturn

(null|string) The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. Null if the URL does not belong to the current site.

SourceSource

File: wp-includes/embed.php


			

ChangelogChangelog

Changelog
Version Description
4.5.3 Introduced.
Scroll to Top