WordPress.org

Make WordPress Core

Opened 13 months ago

Last modified 2 weeks ago

#43579 assigned enhancement

Optional post_id param in media_sideload_image and media_handle_sideload function

Reported by: sebastian.pisula Owned by: antpb
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch needs-testing
Focuses: Cc:

Description

I think that post_id param in media_sideload_image and media_handle_sideload function should be option optional.

media_sideload_image() call media_handle_sideload() with post_id and this function get current time $time = current_time( 'mysql' ); if post date not exists.

Sa this param can be optional.

Attachments (2)

43579.patch (2.0 KB) - added by sebastian.pisula 13 months ago.
435791.patch (2.0 KB) - added by sebastian.pisula 13 months ago.

Download all attachments as: .zip

Change History (6)

#1 @sebastian.pisula
13 months ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #core-media by mike. View the logs.


2 weeks ago

#3 @antpb
2 weeks ago

#38959 was marked as a duplicate.

#4 @antpb
2 weeks ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 5.3
  • Owner set to antpb
  • Status changed from new to assigned
  • Type changed from feature request to enhancement

Hi @sebastianpisula ! Thanks for contributing this patch. It is a great change. This was also worked on in #38959 and was discussed in the most recent media meeting. We agree that the solution is sound and that it should move forward in the 5.3 milestone. I'll be testing it in the coming week and will work to commit it.

Just wanted to leave this comment to document the work that @dotancohen did in #38959 . You both came to the very same solution and the Media team thinks you should both get props for it. I'm going to make sure that happens. :)

Thanks again, and more info to follow soon as I test.

Note: See TracTickets for help on using tickets.