Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#25176 closed enhancement (fixed)

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

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


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 5 years ago.
25176.2.patch (1.5 KB) - added by ocean90 5 years ago.

Download all attachments as: .zip

Change History (7)

5 years ago

#1 @nacin
5 years ago

  • Milestone changed from Awaiting Review to 3.7

#2 @SergeyBiryukov
5 years ago

#25261 was marked as a duplicate.

#3 @SergeyBiryukov
5 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.

5 years ago

#4 @ocean90
5 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
4 years ago

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