apply_filters( 'wp_audio_shortcode_override', string $html , array $attr , string $content , int $instance )
Filters the default audio shortcode output.
Description
If the filtered output isn’t empty, it will be used instead of generating the default audio template.
Parameters
-
$html
string -
Empty variable to be replaced with shortcode markup.
-
$attr
array -
Attributes of the shortcode. See wp_audio_shortcode() .
More Arguments from wp_audio_shortcode( ... $attr )
Attributes of the audio shortcode.
src
stringURL to the source of the audio file. Default empty.loop
stringThe'loop'
attribute for the<audio>
element. Default empty.autoplay
stringThe'autoplay'
attribute for the<audio>
element. Default empty.preload
stringThe'preload'
attribute for the<audio>
element. Default'none'
.class
stringThe'class'
attribute for the<audio>
element. Default'wp-audio-shortcode'
.style
stringThe'style'
attribute for the<audio>
element. Default 'width: 100%;'.
-
$content
string -
Shortcode content.
-
$instance
int -
Unique numeric ID of this audio shortcode instance.
Source
File: wp-includes/media.php
.
View all references
$override = apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instance );
Changelog
Version | Description |
---|---|
3.6.0 | Introduced. |