[wp-trac] [WordPress Trac] #50972: media_handle_sideload() does not allow $post_data to override the post_date that gets used by wp_upload_dir
WordPress Trac
noreply at wordpress.org
Thu Aug 13 05:23:21 UTC 2020
#50972: media_handle_sideload() does not allow $post_data to override the post_date
that gets used by wp_upload_dir
--------------------------+-----------------------------
Reporter: jamesgol | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: minor | Keywords:
Focuses: |
--------------------------+-----------------------------
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).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50972>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list