oembed_dataparse
Filter HookDescription
Filters the returned oEmbed HTML. Use this filter to add support for custom data types, or to filter the result.Hook Information
File Location |
wp-includes/class-wp-oembed.php
View on GitHub
|
Hook Type | Filter |
Line Number | 746 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$return
|
The returned oEmbed HTML. |
object
|
$data
|
A data object result from an oEmbed provider. |
string
|
$url
|
The URL of the content to be embedded. |
Usage Examples
Basic Usage
<?php
// Hook into oembed_dataparse
add_filter('oembed_dataparse', 'my_custom_filter', 10, 3);
function my_custom_filter($return, $data, $url) {
// Your custom filtering logic here
return $return;
}
Source Code Context
wp-includes/class-wp-oembed.php:746
- How this hook is used in WordPress core
<?php
741 *
742 * @param string $return The returned oEmbed HTML.
743 * @param object $data A data object result from an oEmbed provider.
744 * @param string $url The URL of the content to be embedded.
745 */
746 return apply_filters( 'oembed_dataparse', $return, $data, $url );
747 }
748
749 /**
750 * Strips any new lines from the HTML.
751 *
PHP Documentation
<?php
/**
* Filters the returned oEmbed HTML.
*
* Use this filter to add support for custom data types, or to filter the result.
*
* @since 2.9.0
*
* @param string $return The returned oEmbed HTML.
* @param object $data A data object result from an oEmbed provider.
* @param string $url The URL of the content to be embedded.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/class-wp-oembed.php
Related Hooks
Related hooks will be displayed here in future updates.