#18017 closed enhancement (fixed)
set_url_scheme() function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | minor | Version: | |
Component: | General | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
After seeing the idea suggested on ticket #14835 and discussing it in #18005, I thought I'd add in this function which filters a url to return the url with correct protocol (http/https).
Next step would be to implement the function throughout wherever there already is such filtering (or where there should be).
What do you think? Good minor addition to 3.2.x or 3.3?
Attachments (5)
Change History (18)
#2
@
12 years ago
I'll take a look a bit later at get_site_url() and I can send in a new patch shortly.
Thanks!
#4
@
12 years ago
How do we go about now adding this function when needed in other places within core?
@
12 years ago
as Nacin pointed out, I had a little tabbing issue in the diff, here's the update - also following a better naming convention (-# instead of -b)
Note: See
TracTickets for help on using
tickets.
That's a good start. I think it should have an optional $scheme argument that is handled in the same manner as is done get_site_url(). That way you could pass http, https, admin, login, or login_post if you need to force a particular scheme or context. The default would check is_ssl().