Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#25261 closed enhancement (duplicate)

Improve wp_ext2type() to support image file extensions

Reported by: Jonnyauk Owned by:
Priority: normal Milestone:
Component: Media Version: 3.6
Severity: minor Keywords: has-patch
Cc: Focuses:

Description

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).

Attachments (1)

25261-v1.patch (823 bytes ) - added by Jonnyauk 13 years ago.
Patch to add image file extensions

Download all attachments as: .zip

Change History (3)

@Jonnyauk
13 years ago

Patch to add image file extensions

#1 @SergeyBiryukov
13 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Duplicate of #25176.

#2 @SergeyBiryukov
13 years ago

  • Version trunk3.6
Note: See TracTickets for help on using tickets.