[wp-trac] [WordPress Trac] #25261: Improve wp_ext2type() to support image file extensions

WordPress Trac noreply at wordpress.org
Mon Sep 9 09:56:47 UTC 2013


#25261: Improve wp_ext2type() to support image file extensions
-------------------------+-----------------------------------
 Reporter:  Jonnyauk     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:  trunk
 Severity:  minor        |   Keywords:  2nd-opinion has-patch
-------------------------+-----------------------------------
 In wp-includes/functions.php there is potential to improve the
 wp_ext2type() function. It currently doesn't recognise image file
 extensions.

 Although there is a filter available in this function ('ext2type') to use,
 I'd imagine expected behaviour would be native support for image file
 extensions without interacting with this filter.

 I've attached a simple patch that addresses this - will return 'image' for
 file extensions 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff',
 'ico' (core allowed image filetypes).

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25261>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list