wp_audio_shortcode


wp_audio_shortcode ( $attr, $content = '' )

Parameters:
  • (array) attr { Attributes of the audio shortcode. @type string $src URL to the source of the audio file. Default empty. @type string $loop The 'loop' attribute for the `<audio>` element. Default empty. @type string $autoplay The 'autoplay' attribute for the `<audio>` element. Default empty. @type string $preload The 'preload' attribute for the `<audio>` element. Default 'none'. @type string $class The 'class' attribute for the `<audio>` element. Default 'wp-audio-shortcode'. @type string $style The 'style' attribute for the `<audio>` element. Default 'width: 100%;'. }
  • (string) content Shortcode content.
Returns:
  • (string|void) HTML content to display audio.
Defined at:

Description

Builds the Audio shortcode output.This implements the functionality of the Audio Shortcode for displaying WordPress mp3s in a post.

Related Functions

wp_video_shortcode, do_shortcode, wp_playlist_shortcode, add_shortcode, img_caption_shortcode

Top Google Results

User discussions

wpseek mobile