[wp-trac] [WordPress Trac] #33887: Multisite update from SSL network fails on non SSL domains
WordPress Trac
noreply at wordpress.org
Wed Dec 9 01:50:48 UTC 2015
#33887: Multisite update from SSL network fails on non SSL domains
----------------------------------+----------------------------------------
Reporter: typify | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 4.3
Severity: normal | Resolution:
Keywords: has-patch needs- | Focuses: administration, multisite
testing |
----------------------------------+----------------------------------------
Comment (by mensmaximus):
I have solved this issue by adding two filters to /mu-plugins/ms-
functions.php
{{{#!php
<?php
add_filter( 'network_admin_url', 'mmx_network_admin_url', 1, 2 );
function mmx_network_admin_url( $url, $path ){
$url = "https://my_master_domain/wp-admin/network/" . $path;
return $url;
}
add_filter( 'admin_url', 'mmx_admin_url', 1, 3 );
function mmx_admin_url( $url, $path, $blog_id ) {
$blog_id = ( $blog_id ) ? $blog_id : get_current_blog_id();
if ( preg_match( '|^http(s)?://|', $url) ) {
$blog_details = get_blog_details( $blog_id );
$url = $blog_details->siteurl . '/wp-admin/' . $path;
}
return $url;
}
}}}
This fixes network upgrade issues as well as the wrong site urls in the
admin panel
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33887#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list