wp_audio_shortcode_class filter-hookWP 3.6.0

Filters the class attribute for the audio shortcode output container.

Usage

add_filter( 'wp_audio_shortcode_class', 'wp_kama_audio_shortcode_class_filter', 10, 2 );

/**
 * Function for `wp_audio_shortcode_class` filter-hook.
 * 
 * @param string $class CSS class or list of space-separated classes.
 * @param array  $atts  Array of audio shortcode attributes.
 *
 * @return string
 */
function wp_kama_audio_shortcode_class_filter( $class, $atts ){

	// filter...
	return $class;
}
$class(string)
CSS class or list of space-separated classes.
$atts(array)
Array of audio shortcode attributes.

Changelog

Since 3.6.0 Introduced.
Since 4.9.0 The $atts parameter was added.

Where the hook is called

wp_audio_shortcode()
wp_audio_shortcode_class
wp-includes/media.php 3344
$atts['class'] = apply_filters( 'wp_audio_shortcode_class', $atts['class'], $atts );

Where the hook is used in WordPress

Usage not found.