WordPress Playlist WPSE

At first glance you just need to change get_tracks_from_content. Rather than running $content through do_shortcodes, split it by linebreaks (or whitespace?) and discard empty lines, or anything that isn’t an URL probably make the strip_tags call at this point, on each value you have left pass the URLs into track_shortcode as [ “src” => $url … Read more

get post playlist like get_post_gallery()

We can look at get_post_galleries() for ideas how to handle playlists instead of galleries. Here’s an untested modification based on the core function: function wpse_get_post_playlists( $post, $html = true ) { if ( ! $post = get_post( $post ) ) return array(); if ( ! has_shortcode( $post->post_content, ‘playlist’ ) ) return array(); $playlists = array(); … Read more

Playlist shortcode, prevent repeat

I was able to bind to the audio object’s ended event. But there is certainly more logic that would need to be added. This is working for me: (function($){ var customAudio = { initialize: function() { var self = this; // execute logic independently for each playlist in the document $(‘.wp-playlist’).each(function(index) { // determine the … Read more