Make WordPress Core

Opened 11 years ago

Last modified 7 years ago

#34853 new enhancement

A helper method should be created to centralize which extensions are used for images.

Reported by: dan.rossiter Owned by:
Priority: normal Milestone:
Component: General Version: 4.4
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

In keeping with the helper methods introduced in 3.6 for audio/media extensions retrieval, the retrieval of image extensions should similarly be wrapped in a filterable method. Currently all places where this information is needed appear to simply define their own array and use that -- very un-DRY.

Attachments (1)

add-get-img-method.patch​ (2.8 KB ) - added by dan.rossiter 11 years ago.
Proposed patch for creating wp_get_image_extensions()

Download all attachments as: .zip

Change History (2)

@dan.rossiter
11 years ago

Proposed patch for creating wp_get_image_extensions()

#1 @swissspidy
11 years ago

  • Keywords has-patch added

FYI there's a typo in the filter DocBlock: An array of support audio formats.. It should be image formats.

Note: See TracTickets for help on using tickets.