Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 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 Owned by:
Priority: normal Milestone:
Component: Media Version: 5.6
Severity: minor Keywords:
Cc: Focuses:

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
6 years ago

  • Resolutionduplicate
  • Status newclosed

Duplicate of #50972.

#2 @jamesgol
6 years ago

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

#3 @johnbillion
6 years ago

  • Milestone Awaiting Review

That happens occasionally.

Note: See TracTickets for help on using tickets.