[wp-trac] [WordPress Trac] #38195: Adding more mime_types filter to Media Library

WordPress Trac noreply at wordpress.org
Thu Sep 29 21:49:36 UTC 2016


#38195: Adding more mime_types filter to Media Library
-------------------------+-----------------------------
 Reporter:  zodiac1978   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 In
 https://github.com/WordPress/WordPress/blob/e0a0be9579bf00c673f6fa9c68e87d4546271b37
 /wp-includes/post.php#L2191-L2206 WordPress is defining some default
 mime_types for filtering purpose in the media library.

 At the moment this is everything starting with image, audio and video.

 But there are more mime_types possible:
 https://codex.wordpress.org/Function_Reference/get_allowed_mime_types#Default_allowed_mime_types

 What about adding these mime_types in the way shown in #30788 ?

 I suggest the following groups:

 {{{
 Documents:
 -----------
 application/pdf
 application/rtf
 application/msword
 application/onenote
 application/wordperfect
 application/vnd (should handle MS, LO/OOo and iWorks)
 text/plain
 text/csv
 text/calendar
 text/tab-separated-values
 text/richtext
 }}}

 {{{
 Web-Documents
 --------------
 text/css
 text/html
 application/javascript
 application/x-shockwave-flash
 application/java
 }}}

 {{{
 Archives:
 ---------
 application/x-tar
 application/zip
 application/x-gzip
 application/rar
 application/x-7z-compressed
 }}}

 {{{
 Misc:
 ------
 application/x-msdownload (exe)
 }}}


 I'm just concerned about a possible performance problem.
 See: #31071

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


More information about the wp-trac mailing list