[wp-trac] [WordPress Trac] #36294: Allow retrieval of WordPress media types and their extensions

WordPress Trac noreply at wordpress.org
Tue Mar 22 11:35:47 UTC 2016


#36294: Allow retrieval of WordPress media types and their extensions
------------------------------------+------------------------------
 Reporter:  flixos90                |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Media                   |     Version:  2.5
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by flixos90):

 * keywords:   => has-patch dev-feedback


Comment:

 [attachment:36294.diff] introduces a new function
 `wp_get_type_extensions()` that returns the list and calls that function
 from `wp_ext2type()`.

 I also included a new filter to adjust this list. At first I wondered
 whether we should move the original filter `ext2type` into the new
 function, but I felt this would not be appropriate in terms of naming
 conventions. `ext2type` would now only adjust the types for the
 `wp_ext2type()` function while the filter `wp_type_extensions` would be
 applied globally.

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


More information about the wp-trac mailing list