oembed_response_data
Filter HookDescription
Filters the oEmbed response data.Hook Information
File Location |
wp-includes/embed.php
View on GitHub
|
Hook Type | Filter |
Line Number | 615 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$data
|
The response data. |
WP_Post
|
$post
|
The post object. |
int
|
$width
|
The requested width. |
int
|
$height
|
The calculated height. |
Usage Examples
Basic Usage
<?php
// Hook into oembed_response_data
add_filter('oembed_response_data', 'my_custom_filter', 10, 4);
function my_custom_filter($data, $post, $width, $height) {
// Your custom filtering logic here
return $data;
}
Source Code Context
wp-includes/embed.php:615
- How this hook is used in WordPress core
<?php
610 * @param array $data The response data.
611 * @param WP_Post $post The post object.
612 * @param int $width The requested width.
613 * @param int $height The calculated height.
614 */
615 return apply_filters( 'oembed_response_data', $data, $post, $width, $height );
616 }
617
618
619 /**
620 * Retrieves the oEmbed response data for a given URL.
PHP Documentation
<?php
/**
* Filters the oEmbed response data.
*
* @since 4.4.0
*
* @param array $data The response data.
* @param WP_Post $post The post object.
* @param int $width The requested width.
* @param int $height The calculated height.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-includes/embed.php
Related Hooks
Related hooks will be displayed here in future updates.