Make WordPress Core

Opened 9 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's profile brs14ku Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2.2
Component: Media Keywords:
Focuses: Cc:


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

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)

#1 @dd32
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This works for me.

var_dump( media_sideload_image( '', 0, '', 'src' ) );

Feel free to re-open with an example case that fails.

Note: See TracTickets for help on using tickets.