Adding a download link to native WordPress playlist

Thanks to both of you for your help. Just so it might help others, this is what I did: Downloaded a wordpress plugin to allow custom scripts. I used this one >> https://wordpress.org/plugins/header-and-footer-scripts-inserter/ I then pasted this code within the plugin (thanks to Birgire above & HERE : <script type=”text/html” id=”tmpl-wp-playlist-current-item”> <# if ( data.image … Read more

How to make WordPress audio playlist understand the direct links of audio files shared on google drive?

As you can see in comments section of my question, «birgire» had suggested to a user of his plugin to change the google drive direct link as follow so that It can be recognized an played in the WordPress playlist: A normal google drive direct link is something like this: https://drive.google.com/uc?export=download&id=0Bz4YdwRI3rnCMFRoTmtSS0M1VHM If you make sure … 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