[wp-trac] [WordPress Trac] #41675: Add filter to bypass display/query for Media Months filter in media modal

WordPress Trac noreply at wordpress.org
Sat Aug 19 20:05:59 UTC 2017


#41675: Add filter to bypass display/query for Media Months filter in media modal
-------------------------+------------------------------
 Reporter:  CrazyJaco    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by CrazyJaco):

 This filter hook appears to exist:
 media_library_months_with_files

 If the returned value is anything other than an array, it will execute
 default behavior (running the query and displaying the drop down)

 If the returned value is an array, it will skip the query and populate the
 drop down with whatever is in the array.
 If an empty array is passed, the drop down will still appear with no
 options to select.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41675#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list