Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#38938 closed enhancement (duplicate)

WP API does not expose the ID of sideloaded media.

Reported by: dotancohen's profile dotancohen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: Cc:

Description

Retrieving the ID of sideloaded media requires horrible workarounds:

http://wordpress.stackexchange.com/questions/46363/get-image-id-after-uploading-with-media-sideload-image

I will attach a patch to this issue which makes life easier for WP Theme and Plugin developers who need this feature.

Attachments (1)

wordpress_38938.diff (1.5 KB) - added by dotancohen 8 years ago.
Patch to optionally return the ID of a sideloaded media file.

Download all attachments as: .zip

Change History (2)

@dotancohen
8 years ago

Patch to optionally return the ID of a sideloaded media file.

#1 @swissspidy
8 years ago

  • Component changed from Upload to Media
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version trunk deleted

Hey there,

Thanks for opening a ticket! We're already tracking this enhancement in #19629. Would you mind checking out the current patch and share yours there?

Note: See TracTickets for help on using tickets.