Uses
Uses | Description |
---|---|
wp-includes/embed.php: get_oembed_response_data_for_url() | Retrieves the oEmbed response data for a given URL. |
wp-includes/embed.php: _wp_oembed_get_object() | Returns the initialized WP_oEmbed object. |
Filters the oEmbed result before any HTTP requests are made.
If the URL belongs to the current site, the result is fetched directly instead of going through the oEmbed discovery process.
(null|string) (Required) The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. Default null.
(string) (Required) The URL that should be inspected for discovery <link>
tags.
(array) (Required) oEmbed remote get arguments.
(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.
File: wp-includes/embed.php
function wp_filter_pre_oembed_result( $result, $url, $args ) { $data = get_oembed_response_data_for_url( $url, $args ); if ( $data ) { return _wp_oembed_get_object()->data2html( $data, $url ); } return $result; }
Version | Description |
---|---|
4.5.3 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_filter_pre_oembed_result