WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 17 months 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:

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

Download all attachments as: .zip

Change History (7)

@xparham20 months ago

comment:1 @nacin20 months ago

  • Milestone changed from Awaiting Review to 3.7

comment:2 @SergeyBiryukov20 months ago

#25261 was marked as a duplicate.

comment:3 @SergeyBiryukov20 months 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.

@ocean9020 months ago

comment:4 @ocean9020 months 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.

comment:5 @SergeyBiryukov17 months ago

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