oembed_iframe_title_attribute
Filter HookDescription
Filters the title attribute of the given oEmbed HTML iframe.Hook Information
File Location |
wp-includes/embed.php
View on GitHub
|
Hook Type | Filter |
Line Number | 888 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$title
|
The title attribute. |
string
|
$result
|
The oEmbed HTML result. |
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_iframe_title_attribute
add_filter('oembed_iframe_title_attribute', 'my_custom_filter', 10, 4);
function my_custom_filter($title, $result, $data, $url) {
// Your custom filtering logic here
return $title;
}
Source Code Context
wp-includes/embed.php:888
- How this hook is used in WordPress core
<?php
883 * @param string $title The title attribute.
884 * @param string $result The oEmbed HTML result.
885 * @param object $data A data object result from an oEmbed provider.
886 * @param string $url The URL of the content to be embedded.
887 */
888 $title = apply_filters( 'oembed_iframe_title_attribute', $title, $result, $data, $url );
889
890 if ( '' === $title ) {
891 return $result;
892 }
893
PHP Documentation
<?php
/**
* Filters the title attribute of the given oEmbed HTML iframe.
*
* @since 5.2.0
*
* @param string $title The title attribute.
* @param string $result The oEmbed HTML result.
* @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: 4
- File: wp-includes/embed.php
Related Hooks
Related hooks will be displayed here in future updates.