wp_audio_shortcode_override filter-hookWP 3.6.0

Filters the default audio shortcode output.

If the filtered output isn't empty, it will be used instead of generating the default audio template.

Usage

add_filter( 'wp_audio_shortcode_override', 'wp_kama_audio_shortcode_override_filter', 10, 4 );

/**
 * Function for `wp_audio_shortcode_override` filter-hook.
 * 
 * @param string $html     Empty variable to be replaced with shortcode markup.
 * @param array  $attr     Attributes of the shortcode. See {@see wp_audio_shortcode()}.
 * @param string $content  Shortcode content.
 * @param int    $instance Unique numeric ID of this audio shortcode instance.
 *
 * @return string
 */
function wp_kama_audio_shortcode_override_filter( $html, $attr, $content, $instance ){

	// filter...
	return $html;
}
$html(string)
Empty variable to be replaced with shortcode markup.
$attr(array)
Attributes of the shortcode. See {@see wp_audio_shortcode()}.
$content(string)
Shortcode content.
$instance(int)
Unique numeric ID of this audio shortcode instance.

Changelog

Since 3.6.0 Introduced.

Where the hook is called

wp_audio_shortcode()
wp_audio_shortcode_override
wp-includes/media.php 3259
$override = apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instance );

Where the hook is used in WordPress

Usage not found.