wp_embed_handler_audio
Filter HookDescription
Filters the audio embed output.Hook Information
File Location |
wp-includes/embed.php
View on GitHub
|
Hook Type | Filter |
Line Number | 285 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$audio
|
Audio embed output. |
array
|
$attr
|
An array of embed attributes. |
string
|
$url
|
The original URL that was matched by the regex. |
array
|
$rawattr
|
The original unmodified attributes. |
Usage Examples
Basic Usage
<?php
// Hook into wp_embed_handler_audio
add_filter('wp_embed_handler_audio', 'my_custom_filter', 10, 4);
function my_custom_filter($audio, $attr, $url, $rawattr) {
// Your custom filtering logic here
return $audio;
}
Source Code Context
wp-includes/embed.php:285
- How this hook is used in WordPress core
<?php
280 * @param string $audio Audio embed output.
281 * @param array $attr An array of embed attributes.
282 * @param string $url The original URL that was matched by the regex.
283 * @param array $rawattr The original unmodified attributes.
284 */
285 return apply_filters( 'wp_embed_handler_audio', $audio, $attr, $url, $rawattr );
286 }
287
288 /**
289 * Video embed handler callback.
290 *
PHP Documentation
<?php
/**
* Filters the audio embed output.
*
* @since 3.6.0
*
* @param string $audio Audio embed output.
* @param array $attr An array of embed attributes.
* @param string $url The original URL that was matched by the regex.
* @param array $rawattr The original unmodified attributes.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-includes/embed.php
Related Hooks
Related hooks will be displayed here in future updates.