[wp-trac] [WordPress Trac] #33041: Make get_blogaddress_by_id scheme-aware
WordPress Trac
noreply at wordpress.org
Sun Jul 19 15:40:00 UTC 2015
#33041: Make get_blogaddress_by_id scheme-aware
--------------------------------+-----------------------------
Reporter: AD7six | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: trunk
Severity: normal | Keywords:
Focuses: multisite |
--------------------------------+-----------------------------
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 ) ) : '';
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33041>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list