Filter hook 'wp_audio_embed_handler'

in WP Core File wp-includes/embed.php at line 214

View Source

wp_audio_embed_handler

Filter Hook
Description
Filters the audio embed handler callback.

Hook Information

File Location wp-includes/embed.php View on GitHub
Hook Type Filter
Line Number 214

Hook Parameters

Type Name Description
callable $handler Audio embed handler callback function.

Usage Examples

Basic Usage
<?php
// Hook into wp_audio_embed_handler
add_filter('wp_audio_embed_handler', 'my_custom_filter', 10, 1);

function my_custom_filter($handler) {
    // Your custom filtering logic here
    return $handler;
}

Source Code Context

wp-includes/embed.php:214 - How this hook is used in WordPress core
<?php
 209  	 *
 210  	 * @since 3.6.0
 211  	 *
 212  	 * @param callable $handler Audio embed handler callback function.
 213  	 */
 214  	wp_embed_register_handler( 'audio', '#^https?://.+?\.(' . implode( '|', wp_get_audio_extensions() ) . ')$#i', apply_filters( 'wp_audio_embed_handler', 'wp_embed_handler_audio' ), 9999 );
 215  
 216  	/**
 217  	 * Filters the video embed handler callback.
 218  	 *
 219  	 * @since 3.6.0

PHP Documentation

<?php
/**
	 * Filters the audio embed handler callback.
	 *
	 * @since 3.6.0
	 *
	 * @param callable $handler Audio embed handler callback function.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/embed.php
Related Hooks

Related hooks will be displayed here in future updates.