Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#25176 closed enhancement (fixed)

Add 'image' type/extensions to wp_ext2type() and make it case insensitive

Reported by: xparham's profile xparham Owned by: ocean90's profile ocean90
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.7
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

Well, I know that you can add any type check to wp_ext2type() with ext2type filter, but why it does not support image type by default?

On the other note, I think this function should be case insensitive when it searches for the extension in type arrays.

Please find a patch attached.

Attachments (2)

25176.patch (1.0 KB) - added by xparham 12 years ago.
25176.2.patch (1.5 KB) - added by ocean90 12 years ago.

Download all attachments as: .zip

Change History (7)

@xparham
12 years ago

#1 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.7

#2 @SergeyBiryukov
12 years ago

#25261 was marked as a duplicate.

#3 @SergeyBiryukov
12 years ago

  • Keywords commit added

I saw some issues on support forums where image uploading didn't work, and it's been reported that adding image types to wp_ext2type() fixes that (I even saw instructions for hacking core instead of using the ext2type filter).

I guess there's a plugin doing something weird, but looks like 25176.patch would solve that as well.

@ocean90
12 years ago

#4 @ocean90
12 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 25437:

Add 'image' type/extensions to wp_ext2type() and make it case insensitive. props xparham. fixes #25176.

#5 @SergeyBiryukov
11 years ago

  • Version changed from trunk to 3.7
Note: See TracTickets for help on using tickets.