wp_playlist_scripts

Outputs and enqueue default scripts and styles for playlists.

Description

wp_playlist_scripts( (string) $type ); 

Parameters (1)

0. $type (string)
Type of playlist. Accepts audio or video..

Usage

  1. if ( !function_exists( 'wp_playlist_scripts' ) ) { 
  2. require_once ABSPATH . WPINC . '/media.php'; 
  3.  
  4. // Type of playlist. Accepts 'audio' or 'video'. 
  5. $type = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_playlist_scripts($type); 
  9.  

Defined (1)

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

/wp-includes/media.php  
  1. function wp_playlist_scripts( $type ) { 
  2. wp_enqueue_style( 'wp-mediaelement' ); 
  3. wp_enqueue_script( 'wp-playlist' ); 
  4. ?> 
  5. <!--[if lt IE 9]><script>document.createElement('<?php echo esc_js( $type ) ?>');</script><![endif]--> 
  6. <?php