Extending to support [playlist]
-
I’m trying to extend this plugin to add support for adding a playlist (utilizing WP’s [playlist] shortcode). I have two button fields, one for an image and one for the audio files each with different data- attributes set (media-type, select-multiple, etc).
If I click the built-in image field button first then I can select an image like normal, but when I then go to click the playlist button it doesn’t “reload” the media manager and all I can choose are images.
If I click my playlist field button then I can select multiple audio files and their ids are returned like I would expect. But then when I click the built-in image field button only audio files are available in the media manager.
In other words it looks like it’s bringing up the same instance of the Media Manager. How can I get it to reload?
I can kinda get it work by selecting the image, saving the widget, reloading the page, then selecting the playlist and saving again, but that’s kinda janky.
Here’s a pastebin of what I have… https://pastebin.com/i22adKR7
- The topic ‘Extending to support [playlist]’ is closed to new replies.