[wp-trac] [WordPress Trac] #41801: add wp_get_image_extensions() and wp_image_extensions filter
WordPress Trac
noreply at wordpress.org
Fri Sep 7 13:56:55 UTC 2018
#41801: add wp_get_image_extensions() and wp_image_extensions filter
-------------------------+-----------------------
Reporter: pbiron | Owner: pbiron
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.0
Component: Media | Version: 4.9
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+-----------------------
Comment (by pbiron):
Replying to [comment:11 birgire]:
> I noticed a typo in [attachment:"41801.2.diff"] in
{{{wp_attachment_is()}}}, where it adds a {{{wp_get_audio_extensions()}}}
instead of {{{wp_get_image_extensions()}}}.
D'oh!
> Additionally I wonder if {{{wp_get_image_extensions()}}} should be used
in {{{translate_smiley()}}}:
>
> https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-
includes/formatting.php#L2802
>
> I'm not so sure about {{{WP_Theme::get_screenshot()}}} though:
>
> https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-includes
/class-wp-theme.php#L962
during yesterday's media chat I took a todo to look for other places in
core that hardcode various media extensions and consider whether those
should be replaced by calls to `wp_get_[audio|image|video]_extensions`.
thanx for these suggestions, I will add them to the list.
Once I get what I think is a complete list I'll add it here and then we
can discuss which ones should be replace and which should stay hardcoded.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41801#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list