[wp-trac] [WordPress Trac] #39821: Please make image extensions array filterable in wp_attachment_is()
WordPress Trac
noreply at wordpress.org
Thu Feb 9 08:59:33 UTC 2017
#39821: Please make image extensions array filterable in wp_attachment_is()
-------------------------+-----------------------------
Reporter: Hinjiriyo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.7.2
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
The function '''wp_attachment_is()'''[1] checks the type of an attachment.
While the checks for audio files and video files call subfunctions with
filterable arrays of extensions [2][3] the check for image files uses a
unfilterable - thus immutable - array.
Please
1) make the array of image file extensions filterable like for audios and
videos to let more image file formats allowed in WP
2) set that line in a subfunction just to be consistent with the functions
for audios and videos, lets call it wp_get_image_extensions()
[1] wp_attachment_is() in /wp-includes/post.php
[2] wp_get_audio_extensions() in /wp-includes/media.php
[2] wp_get_video_extensions() in /wp-includes/media.php
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39821>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list