Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#32695 closed enhancement (duplicate)

media_sideload_image should have option to return ID

Reported by: kraftbj Owned by:
Priority: normal Milestone:
Component: Media Version: 4.2
Severity: normal Keywords:
Cc: Focuses:

Description

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.

Attachments (1)

32695.diff​ (1.0 KB ) - added by kraftbj 11 years ago.
Adds new id return.

Download all attachments as: .zip

Change History (2)

@kraftbj
11 years ago

Adds new id return.

#1 @dd32
11 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed

Although a bit of a mess, see #19629

Note: See TracTickets for help on using tickets.