wp_audio_shortcode_class
Filters the class attribute for the audio shortcode output container.
Description
Parameters (1)
- 0. $atts_class (string)
- CSS class or list of space-separated classes.
Usage
- To run the hook, copy the example below.
- $atts_class = apply_filters( 'wp_audio_shortcode_class', $atts_class );
- if ( !empty( $atts_class ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the wp_audio_shortcode_class callback
- function filter_wp_audio_shortcode_class( $atts_class ) {
- // make filter magic happen here...
- return $atts_class;
- };
- // add the filter
- add_filter( 'wp_audio_shortcode_class', 'filter_wp_audio_shortcode_class', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'wp_audio_shortcode_class', 'filter_wp_audio_shortcode_class', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/media.php
- $atts['class'] = apply_filters( 'wp_audio_shortcode_class', $atts['class'] );