Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #43009, comment 2


Ignore:
Timestamp:
04/11/2018 07:24:17 PM (7 years ago)
Author:
adamsilverstein
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43009, comment 2

    initial v1  
    11Hi @iforrest - thanks for the report, and thanks @birgire for the additional sleuthing.
    22
    3 I think this is actually the expected behavior of the filter, it only affects what happens on initial page load and is not designed to hide the button always, although I can see how the naming might indicate that. These filters were introduced in https://core.trac.wordpress.org/ticket/41675 to enable developers to re-enable the (expensive) query for sound/video files when the page loads. By returning false, you are setting the button initial state to hidden, however once you change the media collection by uploading audio, the Create Audio Playlist option should appear.
     3I think this is actually the expected behavior of the filter, it only affects what happens on initial page load and is not designed to hide the button always, although I can see how the naming might indicate that. These filters were introduced in https://core.trac.wordpress.org/ticket/31071 to enable developers to re-enable the (expensive) query for sound/video files when the page loads. By returning false, you are setting the button initial state to hidden, however once you change the media collection by uploading audio, the Create Audio Playlist option should appear.
    44
    55See docs at https://developer.wordpress.org/reference/hooks/media_library_show_audio_playlist/ & https://developer.wordpress.org/reference/hooks/media_library_show_video_playlist/