diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 0aadf8a995..1000871061 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -998,6 +998,55 @@ function gallery_shortcode( $attr ) { return $output; } +/** + * Output and enqueue default scripts and styles for playlists. + * + * @since 3.9.0 + * + * @param string $type Type of playlist: "audio" or "video." + */ +function wp_playlist_scripts( $type ) { + wp_enqueue_style( 'wp-mediaelement' ); + wp_enqueue_script( 'wp-playlist' ); +?> + + + + - - - - + if ( 1 === $instance ) { + /** + * Hook to print and enqueue playlist scripts, styles, and JavaScript templates. + * + * @since 3.9.0 + * + * @param string $type Type of playlist: "audio" or "video." + * @param string $style The "theme" for the playlist. Core provides "light" and "dark." + */ + do_action( 'wp_playlist_scripts', $type, $style ); + } ?>
@@ -1246,14 +1267,11 @@ function wp_get_playlist( $attr, $type ) {