[wp-trac] [WordPress Trac] #44653: wp_upload_dir not obeying HTTPS and forces everything to HTTP
WordPress Trac
noreply at wordpress.org
Thu Jul 26 18:14:00 UTC 2018
#44653: wp_upload_dir not obeying HTTPS and forces everything to HTTP
--------------------------+-----------------------------
Reporter: son9ne | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
This is a follow-up to #34945.
Bug is still present in 4.7.9. This has even been noted on the docs and a
work-a-round is there too:
https://developer.wordpress.org/reference/functions/wp_upload_dir/#comment-2576
This is due to a bug with: `wp_upload_dir`
When using HTTPS it is expected that `wp_upload_dir()` will respect the
protocol, but it is always returning HTTP for URLs.
To test: setup an HTTPS site then use this in a plugin/theme. It will
always return HTTP for the URLs
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44653>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list