Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#50971 closed defect (bug) (duplicate)

media_handle_sideload() does not allow $post_data to override the post_date that gets used by wp_upload_dir

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

Description

Now that $post_id is an optional attribute to media_handle_sideload() it should be possible to override the $time passed to wp_handle_sideload() via the optional $post_data array.

My use case is calling media_handle_sideload() via a custom plugin, only after the existing library is checked for duplicates is the post actually created so there is no $post_id to reference (yet).

Change History (3)

#1 @mukesh27
5 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #50972.

#2 @jamesgol
5 years ago

Doh, There was an error when I submitted (also did not receive any emails for this one)

#3 @johnbillion
5 years ago

  • Milestone Awaiting Review deleted

That happens occasionally.

Note: See TracTickets for help on using tickets.