[wp-trac] [WordPress Trac] #40153: Filter for wp_safe_remote_get in download_url
WordPress Trac
noreply at wordpress.org
Mon Aug 19 09:54:02 UTC 2019
#40153: Filter for wp_safe_remote_get in download_url
-------------------------+------------------------------
Reporter: realloc | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------------------
Changes (by donmhico):
* keywords: => has-patch
Comment:
I added a new patch for this issue.
Here are some key points about the new patch I attached
[https://core.trac.wordpress.org/attachment/ticket/40153/40153.2.diff
40153.2.diff].
1. Added docs regarding the new filter named
`download_url_remote_get_args` which was introduced.
2. Unlike the first patch, I think it's best to not allow the new filter
to override `$args['timeout']`, `$args['stream']`, and
`$args['filename']`.
`$args['timeout']` can be debatable. But I think it's enough that
`download_url()` itself accepts the `$timeout` params.
`$args['filename']` and `$args['stream']` unless there's a good reason,
these 2 should also be left untouched IMHO to prevent any unexpected
issues to arise with how `download_url()` currently works.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40153#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list