W3cubDocs

/WordPress

apply_filters( ‘oembed_result’, string|false $data, string $url, string|array $args )

Filters the HTML returned by the oEmbed provider.

Parameters

$datastring|false
The returned oEmbed HTML (false if unsafe).
$urlstring
URL of the content to be embedded.
$argsstring|array
Additional arguments for retrieving embed HTML.
See wp_oembed_get() for accepted arguments. Default empty.
More Arguments from wp_oembed_get( … $args )Additional arguments for retrieving embed HTML.
  • width int|string
    Optional. The maxwidth value passed to the provider URL.
  • height int|string
    Optional. The maxheight value passed to the provider URL.
  • discover bool
    Optional. Determines whether to attempt to discover link tags at the given URL for an oEmbed provider when the provider URL is not found in the built-in providers list. Default true.

Source

return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args );

Changelog

Version Description
2.9.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/oembed_result