Thread Starter
ebud
(@ebud)
Don’t know. I haven’t dabbled in multisite lately.
Thread Starter
ebud
(@ebud)
Hi Jeff,
Is there a more elegant way of doing this, as a apposed to hacking your plugin file which I’d rather not do?
class-theme-my-login-ms-signup.php
public function network_site_url( $url, $path, $orig_scheme ) {
global $current_site;
$url = $this->site_url( $url, $path, $orig_scheme );
// HACK
//switch_to_blog( 1 );
$url = Theme_My_Login::get_object()->site_url( $url, $path, $orig_scheme, $current_site->blog_id );
restore_current_blog();
return $url;
}
This seems to force registration/activation…etc. to say on the sub-site rather then go out to the root site and in my tests seems to work well at this point, but I am also wondering about how your move to drop support for Multisite could impact this?
After reviewing that old code, I see what the change was. TML no longer creates it’s objects as global variables, but instead uses a singleton pattern. Replace
global $theme_my_login_ms_signup;
with
$theme_my_login_ms_signup = Theme_My_Login_MS_Signup::get_object();
Thread Starter
ebud
(@ebud)
Thanks Jeff – works now and I feel much better not hacking your Plugin!
The only catch is the link for the password reset in the email points back to the parent site, I’d rather they never leave the sub-site – Ideas?
I am also curious about the future and TML v7 and how I may or may not be effected. Currently I am running WP v4.2.5 and have not applied your latest patch for v4.3 – Any recommendation on this front?
TML 6.4 hasn’t changed anything on the multisite front. That won’t happen until 7.0.