[wp-trac] [WordPress Trac] #48421: Add $unfiltered param to wp_get_original_image_path() and wp_get_original_image_url() functions
WordPress Trac
noreply at wordpress.org
Thu Oct 24 12:32:41 UTC 2019
#48421: Add $unfiltered param to wp_get_original_image_path() and
wp_get_original_image_url() functions
-------------------------+-----------------------------
Reporter: ianmjones | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Since #48302 there are now both `wp_get_original_image_path()` and
`wp_get_original_image_url()` functions that take an attachment id and
return the original large pre-scaled image path or URL.
However, unlike `wp_get_attached_file()`, neither take an `$unfiltered`
param.
This is problematic for plugins wanting to work with the local path or URL
for an original file but either it or another plugin already implements
filters that alter the `wp_get_attached_file()` or
`wp_get_attachment_metadata()` results that both of these
`wp_get_original_image_*` functions use.
Also, as per the `wp_get_attached_file()` and
`wp_get_attachment_metadata()` functions, it would be good if the
`$unfiltered` param meant the respective `wp_get_original_image_path` and
`wp_get_original_image_url` filters were short-cut out and not run if
`$unfiltered` is `true`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48421>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list