Opened 10 years ago
Closed 9 years ago
#32564 closed defect (bug) (worksforme)
media_sideload_image() does not return 'src' when 'src' is passed as return parameter
Reported by: | brs14ku | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2.2 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
Function returns either WP_Error or the html image tag with the src in it. It doesn't return just the source when specifying it as the return parameter as the docs state here https://developer.wordpress.org/reference/functions/media_sideload_image/
Ticket #19629 is a request to add a return option of the id as an enhancement. This however, seems like a bug.
Change History (1)
Note: See
TracTickets for help on using
tickets.
This works for me.
Feel free to re-open with an example case that fails.