[wp-trac] [WordPress Trac] #43009: Create Video/Audio Playlist hooks not working as expected

WordPress Trac noreply at wordpress.org
Tue Jan 2 15:54:43 UTC 2018


#43009: Create Video/Audio Playlist hooks not working as expected
--------------------------+-----------------------------
 Reporter:  iforrest      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.9.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 WordPress now provides the following hooks:

 https://developer.wordpress.org/reference/hooks/media_library_show_video_playlist/
 https://developer.wordpress.org/reference/hooks/media_library_show_audio_playlist/

 We can use these to hide the “Create Video Playlist” (and Audio) button in
 the media library.

 These only seem to work on initial page load. The “Create Video Playlist”
 button still appears for me even though I'm using these filters.

 To reproduce from a fresh install.

 1. Set these lines in your theme functions.php

 {{{#!php
 add_filter( 'media_library_show_audio_playlist', function() { return
 false; });
 add_filter( 'media_library_show_video_playlist', function() { return
 false; });
 }}}

 2. Go to wp-admin/post-new.php.

 3. Click 'Add Media', notice that the playlist buttons are missing.

 4. Upload a video file (I used .mov). Notice that the 'Create Video
 Playlist' button now appears.

 This likely exists in versions earlier than 4.9.1, but this was the
 version I tested in.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43009>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list