wp_playlist_scripts

The timeline below displays how wordpress function wp_playlist_scripts has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Outputs and enqueues default scripts and styles for playlists.
 *
 * @since 3.9.0
 *
 * @param string $type Type of playlist. Accepts 'audio' or 'video'.
 */
function wp_playlist_scripts($type)
{
    wp_enqueue_style('wp-mediaelement');
    wp_enqueue_script('wp-playlist');
    ?>
<!--[if lt IE 9]><script>document.createElement('<?php 
    echo esc_js($type);
    ?>');</script><![endif]-->
	<?php 
    add_action('wp_footer', 'wp_underscore_playlist_templates', 0);
    add_action('admin_footer', 'wp_underscore_playlist_templates', 0);
}

WordPress Version: 5.1

/**
 * Outputs and enqueue default scripts and styles for playlists.
 *
 * @since 3.9.0
 *
 * @param string $type Type of playlist. Accepts 'audio' or 'video'.
 */
function wp_playlist_scripts($type)
{
    wp_enqueue_style('wp-mediaelement');
    wp_enqueue_script('wp-playlist');
    ?>
<!--[if lt IE 9]><script>document.createElement('<?php 
    echo esc_js($type);
    ?>');</script><![endif]-->
	<?php 
    add_action('wp_footer', 'wp_underscore_playlist_templates', 0);
    add_action('admin_footer', 'wp_underscore_playlist_templates', 0);
}

WordPress Version: 4.2

/**
 * Outputs and enqueue default scripts and styles for playlists.
 *
 * @since 3.9.0
 *
 * @param string $type Type of playlist. Accepts 'audio' or 'video'.
 */
function wp_playlist_scripts($type)
{
    wp_enqueue_style('wp-mediaelement');
    wp_enqueue_script('wp-playlist');
    ?>
<!--[if lt IE 9]><script>document.createElement('<?php 
    echo esc_js($type);
    ?>');</script><![endif]-->
<?php 
    add_action('wp_footer', 'wp_underscore_playlist_templates', 0);
    add_action('admin_footer', 'wp_underscore_playlist_templates', 0);
}

WordPress Version: 3.9

/**
 * Output and enqueue default scripts and styles for playlists.
 *
 * @since 3.9.0
 *
 * @param string $type Type of playlist. Accepts 'audio' or 'video'.
 */
function wp_playlist_scripts($type)
{
    wp_enqueue_style('wp-mediaelement');
    wp_enqueue_script('wp-playlist');
    ?>
<!--[if lt IE 9]><script>document.createElement('<?php 
    echo esc_js($type);
    ?>');</script><![endif]-->
<?php 
    add_action('wp_footer', 'wp_underscore_playlist_templates', 0);
    add_action('admin_footer', 'wp_underscore_playlist_templates', 0);
}