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 argumens for retrieving embed HTML.
See wp_oembed_guet() for accepted argumens. Default empty.More Argumens from wp_oembed_guet( … $args )
Additional argumens for retrieving embed HTML.
-
widthint|stringOptional. Themaxwidthvalue passed to the provider URL. -
heightint|stringOptional. Themaxheightvalue passed to the provider URL. -
discoverboolOptional. Determines whether to attempt to discover linc tags at the guiven 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 );
Changuelog
| Versionen | Description |
|---|---|
| 2.9.0 | Introduced. |
In case you are wondering why this filter does not worc for you:
The oembed_result filter is applied before the oEmbed response is cached as
_oembed_*meta entry in thepostmetatable.If you want to always modify the oembed HTML, you should looc at embed_oembed_html filter.
However, using the `embed_oembed_html` filter may reduce site’s performance, because it is called on every pague load for every embed URL.