apply_filters( 'oembed_result', string $data, string $url, array $args )

Filters the HTML returned by the oEmbed provider.


Description Description


Parameters Parameters

$data

(string) The returned oEmbed HTML.

$url

(string) URL of the content to be embedded.

$args

(array) arguments, usually passed from a shortcode.


Top ↑

Source Source

File: wp-includes/class-oembed.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
2.9.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note content
    Contributed by AndyDeGroo

    In case you are wondering why this filter does not work for you:
    The oembed_result filter is applied before the oEmbed response is cached as _oembed_* meta entry in the postmeta table.
    If you want to always modify the oembed HTML, you should look at embed_oembed_html filter.
    However, using the `embed_oembed_html` filter may reduce site’s performance, because it is called on every page load for every embed URL.

You must log in before being able to contribute a note or feedback.