wp_embed_handler_audio
Filters the audio embed output.
Usage
add_filter( 'wp_embed_handler_audio', 'wp_kama_embed_handler_audio_filter', 10, 4 ); /** * Function for `wp_embed_handler_audio` filter-hook. * * @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. * * @return string */ function wp_kama_embed_handler_audio_filter( $audio, $attr, $url, $rawattr ){ // filter... return $audio; }
- $audio(string)
- Audio embed output.
- $attr(array)
- An array of embed attributes.
- $url(string)
- The original URL that was matched by the regex.
- $rawattr(array)
- The original unmodified attributes.
Changelog
Since 3.6.0 | Introduced. |
Where the hook is called
wp_embed_handler_audio
wp-includes/embed.php 285
return apply_filters( 'wp_embed_handler_audio', $audio, $attr, $url, $rawattr );