[wp-trac] [WordPress Trac] #51780: Add ability to easily get path to sized images (such as parameter to get_attached_file() or wp_get_attachment_thumb_file())
WordPress Trac
noreply at wordpress.org
Sun Jan 29 23:15:28 UTC 2023
#51780: Add ability to easily get path to sized images (such as parameter to
get_attached_file() or wp_get_attachment_thumb_file())
--------------------------------------+---------------------
Reporter: paulschreiber | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.2
Component: Media | Version: 5.5.3
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by Mista-Flo):
Hey folks,
I came up with a patch for this ticket, I think it definitely makes sense
to extends `get_attached_file` function with a size parameter, furthermore
it doesn't affect any current usage of the function as the parameter will
remain an empty string by default.
I also added a quick unit test to check the function works as expected,
not sure if it needs further unit testing?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51780#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list