[wp-trac] [WordPress Trac] #43658: Media attachment filter drop-down mime types in grid mode is not properly filtered by available mime types

WordPress Trac noreply at wordpress.org
Tue Apr 3 12:43:04 UTC 2018


#43658: Media attachment filter drop-down mime types in grid mode is not properly
filtered by available mime types
-------------------------------------------------+-------------------------
 Reporter:  itzmekhokan                          |       Owner:
     Type:  defect (bug)                         |  adamsilverstein
 Priority:  normal                               |      Status:  assigned
Component:  Media                                |   Milestone:  5.0
 Severity:  normal                               |     Version:  4.9.4
 Keywords:  has-patch has-screenshots needs-     |  Resolution:
  testing needs-unit-tests                       |     Focuses:
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):

 * keywords:  has-patch has-screenshots => has-patch has-screenshots needs-
     testing needs-unit-tests
 * owner:   => adamsilverstein
 * status:  new => assigned
 * milestone:  Awaiting Review => 5.0


Comment:

 @itzmekhokan thanks for the bug report and patch!

 Overall your patch looks good and I see the issue you are trying to
 resolve. Can you please provide the code snippet you are using to alter
 the dropdown for testing? Also, it would be nice to add a a unit test
 confirming the filter works as expected and changes the return from
 `wp_enqueue_media`.

 One small coding standards correction, this line is missing some
 whitespace before/after brackets: `unset($mimeTypes[$mime_type]); `

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


More information about the wp-trac mailing list