audio

The WordPress Core audio shortcode.


Usage

  1. // basic usage 
  2. echo do_shortcode('[audio]'); 
  1. // variable usage 
  2. $result = do_shortcode('[audio]'); 
  3. echo $result;  

Defined (1)

The shortcode is defined in the following location(s).

/wp-includes/media.php  
  1. /* @param int $post_id Post ID. 
  2. * @param string $library Media library used for the audio shortcode. 
  3. */ 
  4. return apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id, $library ); 
  5. add_shortcode( 'audio', 'wp_audio_shortcode' ); 
  6.  
  7. /** 
  8. * Returns a filtered list of WP-supported video formats. 
  9. * @since 3.6.0