[wp-trac] [WordPress Trac] #32695: media_sideload_image should have option to return ID
WordPress Trac
noreply at wordpress.org
Thu Jun 18 05:39:12 UTC 2015
#32695: media_sideload_image should have option to return ID
-------------------------+-----------------------------
Reporter: kraftbj | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.2
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
`media_sideload_image` can either return the URL of the sideloaded image
or a full HTML tag. It should have an option to return the attachment ID
as well.
One use case is to sideload an image, then set it as a the
`post_thumbnail`.
This is currently possible via `media_handle_sideload` but requires
duplication of the work already being done in `media_sideload_image`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32695>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list