Opened 9 years ago
Closed 9 years ago
#33041 closed enhancement (duplicate)
Make get_blogaddress_by_id scheme-aware
Reported by: | AD7six | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Networks and Sites | Keywords: | |
Focuses: | multisite | Cc: |
Description
Currently this method only returns a http link, irrespective of the requested url scheme or site setup.
This patch adds a call to set_url_scheme so that (hopefully) the returned url is https if it's for a https site/setup.
--- wp-includes/ms-blogs.php +++ wp-includes/ms-blogs.php @@ -39,7 +39,7 @@ function wpmu_update_blogs_date() { */ function get_blogaddress_by_id( $blog_id ) { $bloginfo = get_blog_details( (int) $blog_id, false ); // only get bare details! - return ( $bloginfo ) ? esc_url( 'http://' . $bloginfo->domain . $bloginfo->path ) : ''; + return ( $bloginfo ) ? esc_url( set_url_scheme( 'http://' . $bloginfo->domain . $bloginfo->path ) ) : ''; }
Attachments (2)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Thanks for the report, AD7six! We're already aware of this bug and we're working on it on ticket #14867.
Note that the solution is not for the return URL's scheme to respect the current scheme, but to respect the scheme of the requested blog.