<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13884] trunk: Use network_*_url().</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13884">13884</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-03-29 21:45:31 +0000 (Mon, 29 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use network_*_url(). see <a href="http://trac.wordpress.org/ticket/12736">#12736</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpactivatephp">trunk/wp-activate.php</a></li>
<li><a href="#trunkwpadminincludesmsphp">trunk/wp-admin/includes/ms.php</a></li>
<li><a href="#trunkwpadminmsoptionsphp">trunk/wp-admin/ms-options.php</a></li>
<li><a href="#trunkwpincludeslinktemplatephp">trunk/wp-includes/link-template.php</a></li>
<li><a href="#trunkwpincludesmsfunctionsphp">trunk/wp-includes/ms-functions.php</a></li>
<li><a href="#trunkwploginphp">trunk/wp-login.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpactivatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-activate.php (13883 => 13884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-activate.php        2010-03-29 20:35:06 UTC (rev 13883)
+++ trunk/wp-activate.php        2010-03-29 21:45:31 UTC (rev 13884)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">         &lt;?php if ( empty($_GET['key']) &amp;&amp; empty($_POST['key']) ) { ?&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;h2&gt;&lt;?php _e('Activation Key Required') ?&gt;&lt;/h2&gt;
</span><del>-                &lt;form name=&quot;activateform&quot; id=&quot;activateform&quot; method=&quot;post&quot; action=&quot;&lt;?php echo 'http://' . $current_site-&gt;domain . $current_site-&gt;path ?&gt;wp-activate.php&quot;&gt;
</del><ins>+                &lt;form name=&quot;activateform&quot; id=&quot;activateform&quot; method=&quot;post&quot; action=&quot;&lt;?php echo network_site_url('wp-activate.php'); ?&gt;&quot;&gt;
</ins><span class="cx">                         &lt;p&gt;
</span><span class="cx">                             &lt;label for=&quot;key&quot;&gt;&lt;?php _e('Activation Key:') ?&gt;&lt;/label&gt;
</span><span class="cx">                             &lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;key&quot; id=&quot;key&quot; value=&quot;&quot; size=&quot;50&quot; /&gt;
</span><span class="lines">@@ -64,9 +64,9 @@
</span><span class="cx">                                 &lt;h2&gt;&lt;?php _e('Your account is now active!'); ?&gt;&lt;/h2&gt;
</span><span class="cx">                                 &lt;?php
</span><span class="cx">                             if ( $signup-&gt;domain . $signup-&gt;path == '' ) {
</span><del>-                                    printf(__('&lt;p class=&quot;lead-in&quot;&gt;Your account has been activated. You may now &lt;a href=&quot;%1$s&quot;&gt;login&lt;/a&gt; to the site using your chosen username of &quot;%2$s&quot;.  Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can &lt;a href=&quot;%4$s&quot;&gt;reset your password&lt;/a&gt;.&lt;/p&gt;'), 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'wp-login.php', $signup-&gt;user_login, $signup-&gt;user_email, 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'wp-login.php?action=lostpassword');
</del><ins>+                                    printf(__('&lt;p class=&quot;lead-in&quot;&gt;Your account has been activated. You may now &lt;a href=&quot;%1$s&quot;&gt;login&lt;/a&gt; to the site using your chosen username of &quot;%2$s&quot;.  Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can &lt;a href=&quot;%4$s&quot;&gt;reset your password&lt;/a&gt;.&lt;/p&gt;'), network_site_url('wp-login.php', 'login'), $signup-&gt;user_login, $signup-&gt;user_email, network_site_url('wp-login.php?action=lostpassword', 'login'));
</ins><span class="cx">                             } else {
</span><del>-                                    printf(__('&lt;p class=&quot;lead-in&quot;&gt;Your site at &lt;a href=&quot;%1$s&quot;&gt;%2$s&lt;/a&gt; is active. You may now login to your site using your chosen username of &quot;%3$s&quot;.  Please check your email inbox at %4$s for your password and login instructions.  If you do not receive an email, please check your junk or spam folder.  If you still do not receive an email within an hour, you can &lt;a href=&quot;%5$s&quot;&gt;reset your password&lt;/a&gt;.&lt;/p&gt;'), 'http://' . $signup-&gt;domain, $signup-&gt;domain, $signup-&gt;user_login, $signup-&gt;user_email, 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'wp-login.php?action=lostpassword');
</del><ins>+                                    printf(__('&lt;p class=&quot;lead-in&quot;&gt;Your site at &lt;a href=&quot;%1$s&quot;&gt;%2$s&lt;/a&gt; is active. You may now login to your site using your chosen username of &quot;%3$s&quot;.  Please check your email inbox at %4$s for your password and login instructions.  If you do not receive an email, please check your junk or spam folder.  If you still do not receive an email within an hour, you can &lt;a href=&quot;%5$s&quot;&gt;reset your password&lt;/a&gt;.&lt;/p&gt;'), 'http://' . $signup-&gt;domain, $signup-&gt;domain, $signup-&gt;user_login, $signup-&gt;user_email, network_site_url('wp-login.php?action=lostpassword'));
</ins><span class="cx">                             }
</span><span class="cx">                         } else {
</span><span class="cx">                                 ?&gt;
</span><span class="lines">@@ -86,10 +86,10 @@
</span><span class="cx">                                 &lt;p&gt;&lt;span class=&quot;h3&quot;&gt;&lt;?php _e('Password:'); ?&gt;&lt;/span&gt; &lt;?php echo $password; ?&gt;&lt;/p&gt;
</span><span class="cx">                         &lt;/div&gt;
</span><span class="cx"> 
</span><del>-                        &lt;?php if ( $url != 'http://' . $current_site-&gt;domain . $current_site-&gt;path ) : ?&gt;
</del><ins>+                        &lt;?php if ( $url != network_home_url('', 'http') ) : ?&gt;
</ins><span class="cx">                                 &lt;p class=&quot;view&quot;&gt;&lt;?php printf(__('Your account is now activated. &lt;a href=&quot;%1$s&quot;&gt;View your site&lt;/a&gt; or &lt;a href=&quot;%2$s&quot;&gt;Login&lt;/a&gt;'), $url, $url . 'wp-login.php' ); ?&gt;&lt;/p&gt;
</span><span class="cx">                         &lt;?php else: ?&gt;
</span><del>-                                &lt;p class=&quot;view&quot;&gt;&lt;?php printf( __( 'Your account is now activated. &lt;a href=&quot;%1$s&quot;&gt;Login&lt;/a&gt; or go back to the &lt;a href=&quot;%2$s&quot;&gt;homepage&lt;/a&gt;.' ), 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'wp-login.php', 'http://' . $current_site-&gt;domain . $current_site-&gt;path ); ?&gt;&lt;/p&gt;
</del><ins>+                                &lt;p class=&quot;view&quot;&gt;&lt;?php printf( __( 'Your account is now activated. &lt;a href=&quot;%1$s&quot;&gt;Login&lt;/a&gt; or go back to the &lt;a href=&quot;%2$s&quot;&gt;homepage&lt;/a&gt;.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?&gt;&lt;/p&gt;
</ins><span class="cx">                         &lt;?php endif;
</span><span class="cx">                 }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpadminincludesmsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ms.php (13883 => 13884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ms.php        2010-03-29 20:35:06 UTC (rev 13883)
+++ trunk/wp-admin/includes/ms.php        2010-03-29 21:45:31 UTC (rev 13884)
</span><span class="lines">@@ -249,7 +249,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function update_option_new_admin_email($old_value, $value) {
</span><del>-        global $current_site;
</del><span class="cx">         if ( $value == get_option( 'admin_email' ) || !is_email( $value ) )
</span><span class="cx">                 return;
</span><span class="cx"> 
</span><span class="lines">@@ -276,17 +275,17 @@
</span><span class="cx"> All at ###SITENAME###
</span><span class="cx"> ###SITEURL###&quot;), $new_admin_email );
</span><span class="cx"> 
</span><del>-        $content = str_replace('###ADMIN_URL###', esc_url(get_option( &quot;siteurl&quot; ).'/wp-admin/options.php?adminhash='.$hash), $content);
</del><ins>+        $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash='.$hash)), $content);
</ins><span class="cx">         $content = str_replace('###EMAIL###', $value, $content);
</span><span class="cx">         $content = str_replace('###SITENAME###', get_site_option( 'site_name' ), $content);
</span><del>-        $content = str_replace('###SITEURL###', 'http://' . $current_site-&gt;domain . $current_site-&gt;path, $content);
</del><ins>+        $content = str_replace('###SITEURL###', network_home_url(), $content);
</ins><span class="cx"> 
</span><span class="cx">         wp_mail( $value, sprintf(__('[%s] New Admin Email Address'), get_option('blogname')), $content );
</span><span class="cx"> }
</span><span class="cx"> add_action('update_option_new_admin_email', 'update_option_new_admin_email', 10, 2);
</span><span class="cx"> 
</span><span class="cx"> function send_confirmation_on_profile_email() {
</span><del>-        global $errors, $wpdb, $current_user, $current_site;
</del><ins>+        global $errors, $wpdb, $current_user;
</ins><span class="cx">         if ( ! is_object($errors) )
</span><span class="cx">                 $errors = new WP_Error();
</span><span class="cx"> 
</span><span class="lines">@@ -327,10 +326,10 @@
</span><span class="cx"> All at ###SITENAME###
</span><span class="cx"> ###SITEURL###&quot;), $new_user_email );
</span><span class="cx"> 
</span><del>-                $content = str_replace('###ADMIN_URL###', esc_url(get_option( &quot;siteurl&quot; ).'/wp-admin/profile.php?newuseremail='.$hash), $content);
</del><ins>+                $content = str_replace('###ADMIN_URL###', esc_url(admin_url('profile.php?newuseremail='.$hash)), $content);
</ins><span class="cx">                 $content = str_replace('###EMAIL###', $_POST[ 'email' ], $content);
</span><span class="cx">                 $content = str_replace('###SITENAME###', get_site_option( 'site_name' ), $content);
</span><del>-                $content = str_replace('###SITEURL###', 'http://' . $current_site-&gt;domain . $current_site-&gt;path, $content);
</del><ins>+                $content = str_replace('###SITEURL###', network_home_url(), $content);
</ins><span class="cx"> 
</span><span class="cx">                 wp_mail( $_POST[ 'email' ], sprintf(__('[%s] New Email Address'), get_option('blogname')), $content );
</span><span class="cx">                 $_POST[ 'email' ] = $current_user-&gt;user_email;
</span><span class="lines">@@ -534,7 +533,7 @@
</span><span class="cx"> add_filter( 'get_term', 'sync_category_tag_slugs', 10, 2 );
</span><span class="cx"> 
</span><span class="cx"> function redirect_user_to_blog() {
</span><del>-        global $current_user, $current_site;
</del><ins>+        global $current_user;
</ins><span class="cx">         $c = 0;
</span><span class="cx">         if ( isset( $_GET[ 'c' ] ) )
</span><span class="cx">                 $c = (int)$_GET[ 'c' ];
</span><span class="lines">@@ -547,8 +546,7 @@
</span><span class="cx">         $blog = get_active_blog_for_user( $current_user-&gt;ID );
</span><span class="cx">         $dashboard_blog = get_dashboard_blog();
</span><span class="cx">         if ( is_object( $blog ) ) {
</span><del>-                $protocol = ( is_ssl() ? 'https://' : 'http://' );
-                wp_redirect( $protocol . $blog-&gt;domain . $blog-&gt;path . 'wp-admin/?c=' . $c ); // redirect and count to 5, &quot;just in case&quot;
</del><ins>+                wp_redirect( get_admin_url($blog-&gt;blog_id, '?c=' . $c) ); // redirect and count to 5, &quot;just in case&quot;
</ins><span class="cx">                 exit;
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminmsoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-options.php (13883 => 13884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-options.php        2010-03-29 20:35:06 UTC (rev 13883)
+++ trunk/wp-admin/ms-options.php        2010-03-29 21:45:31 UTC (rev 13884)
</span><span class="lines">@@ -84,8 +84,8 @@
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;admin_notice_feed&quot;&gt;&lt;?php _e('Admin Notice Feed') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;&lt;input name=&quot;admin_notice_feed&quot; class=&quot;large-text&quot; type=&quot;text&quot; id=&quot;admin_notice_feed&quot; value=&quot;&lt;?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?&gt;&quot; size=&quot;80&quot; /&gt;&lt;br /&gt;
</span><span class="cx">                                 &lt;?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?&gt;&lt;br /&gt;
</span><del>-                                &lt;?php if ( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'feed/' )
-                                        echo __( &quot;A good one to use would be the feed from your main site: &quot; ) . 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'feed/'; ?&gt;&lt;/td&gt;
</del><ins>+                                &lt;?php if ( get_site_option( 'admin_notice_feed' ) != network_home_url('feed/', 'http') )
+                                        echo __( &quot;A good one to use would be the feed from your main site: &quot; ) . network_home_url('feed/'); ?&gt;&lt;/td&gt;
</ins><span class="cx">                         &lt;/tr&gt;
</span><span class="cx">                 &lt;/table&gt;
</span><span class="cx">                 &lt;h3&gt;&lt;?php _e('Registration Settings'); ?&gt;&lt;/h3&gt;
</span></span></pre></div>
<a id="trunkwpincludeslinktemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/link-template.php (13883 => 13884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/link-template.php        2010-03-29 20:35:06 UTC (rev 13883)
+++ trunk/wp-includes/link-template.php        2010-03-29 21:45:31 UTC (rev 13884)
</span><span class="lines">@@ -2037,6 +2037,10 @@
</span><span class="cx"> */
</span><span class="cx"> function network_site_url( $path = '', $scheme = null ) {
</span><span class="cx">         global $current_site;
</span><ins>+
+        if ( !is_multisite() )
+                return site_url($path, $scheme);
+
</ins><span class="cx">         $orig_scheme = $scheme;
</span><span class="cx">         if ( !in_array($scheme, array('http', 'https')) ) {
</span><span class="cx">                 if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) &amp;&amp; ( force_ssl_login() || force_ssl_admin() ) )
</span><span class="lines">@@ -2075,6 +2079,10 @@
</span><span class="cx"> */
</span><span class="cx"> function network_home_url( $path = '', $scheme = null ) {
</span><span class="cx">         global $current_site;
</span><ins>+
+        if ( !is_multisite() )
+                return home_url($path, $scheme);
+
</ins><span class="cx">         $orig_scheme = $scheme;
</span><span class="cx"> 
</span><span class="cx">         if ( !in_array($scheme, array('http', 'https')) )
</span></span></pre></div>
<a id="trunkwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-functions.php (13883 => 13884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-functions.php        2010-03-29 20:35:06 UTC (rev 13883)
+++ trunk/wp-includes/ms-functions.php        2010-03-29 21:45:31 UTC (rev 13884)
</span><span class="lines">@@ -674,9 +674,9 @@
</span><span class="cx"> 
</span><span class="cx">         // Send email with activation link.
</span><span class="cx">         if ( !is_subdomain_install() || $current_site-&gt;id != 1 )
</span><del>-                $activate_url = &quot;http://&quot; . $current_site-&gt;domain . $current_site-&gt;path . &quot;wp-activate.php?key=$key&quot;;
</del><ins>+                $activate_url = network_site_url(&quot;wp-activate.php?key=$key&quot;);
</ins><span class="cx">         else
</span><del>-                $activate_url = &quot;http://{$domain}{$path}wp-activate.php?key=$key&quot;;
</del><ins>+                $activate_url = &quot;http://{$domain}{$path}wp-activate.php?key=$key&quot;; // @todo use *_url() API
</ins><span class="cx"> 
</span><span class="cx">         $activate_url = esc_url($activate_url);
</span><span class="cx">         $admin_email = get_site_option( &quot;admin_email&quot; );
</span><span class="lines">@@ -841,7 +841,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
</span><del>-        global $current_site;
</del><span class="cx">         if ( get_site_option( 'registrationnotification' ) != 'yes' )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="lines">@@ -849,11 +848,11 @@
</span><span class="cx">         if ( is_email($email) == false )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        $options_site_url = esc_url(&quot;http://{$current_site-&gt;domain}{$current_site-&gt;path}wp-admin/ms-options.php&quot;);
</del><ins>+        $options_site_url = esc_url(network_admin_url('ms-options.php'));
</ins><span class="cx"> 
</span><span class="cx">         switch_to_blog( $blog_id );
</span><span class="cx">         $blogname = get_option( 'blogname' );
</span><del>-        $siteurl = get_option( 'siteurl' );
</del><ins>+        $siteurl = site_url();
</ins><span class="cx">         restore_current_blog();
</span><span class="cx"> 
</span><span class="cx">         $msg = sprintf( __( &quot;New Blog: %1s
</span><span class="lines">@@ -868,8 +867,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function newuser_notify_siteadmin( $user_id ) {
</span><del>-        global $current_site;
-
</del><span class="cx">         if ( get_site_option( 'registrationnotification' ) != 'yes' )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="lines">@@ -880,7 +877,7 @@
</span><span class="cx"> 
</span><span class="cx">         $user = new WP_User($user_id);
</span><span class="cx"> 
</span><del>-        $options_site_url = esc_url(&quot;http://{$current_site-&gt;domain}{$current_site-&gt;path}wp-admin/ms-options.php&quot;);
</del><ins>+        $options_site_url = esc_url(network_admin_url('ms-options.php'));
</ins><span class="cx">         $msg = sprintf(__(&quot;New User: %1s
</span><span class="cx"> Remote IP: %2s
</span><span class="cx"> 
</span><span class="lines">@@ -1278,7 +1275,7 @@
</span><span class="cx">         global $current_site;
</span><span class="cx">         if ( is_main_site() &amp;&amp; is_404() &amp;&amp; defined( 'NOBLOGREDIRECT' ) &amp;&amp; ( $destination = NOBLOGREDIRECT ) ) {
</span><span class="cx">                 if ( $destination == '%siteurl%' )
</span><del>-                        $destination = $current_site-&gt;domain . $current_site-&gt;path;
</del><ins>+                        $destination = network_home_url();
</ins><span class="cx">                 wp_redirect( $destination );
</span><span class="cx">                 exit();
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwploginphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-login.php (13883 => 13884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-login.php        2010-03-29 20:35:06 UTC (rev 13883)
+++ trunk/wp-login.php        2010-03-29 21:45:31 UTC (rev 13884)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> &lt;?php   if ( !is_multisite() ) { ?&gt;
</span><span class="cx"> &lt;div id=&quot;login&quot;&gt;&lt;h1&gt;&lt;a href=&quot;&lt;?php echo apply_filters('login_headerurl', 'http://wordpress.org/'); ?&gt;&quot; title=&quot;&lt;?php echo apply_filters('login_headertitle', __('Powered by WordPress')); ?&gt;&quot;&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/h1&gt;
</span><span class="cx"> &lt;?php   } else { ?&gt;
</span><del>-&lt;div id=&quot;login&quot;&gt;&lt;h1&gt;&lt;a href=&quot;&lt;?php echo apply_filters('login_headerurl', 'http://' . $current_site-&gt;domain . $current_site-&gt;path ); ?&gt;&quot; title=&quot;&lt;?php echo apply_filters('login_headertitle', $current_site-&gt;site_name ); ?&gt;&quot;&gt;&lt;span class=&quot;hide&quot;&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
</del><ins>+&lt;div id=&quot;login&quot;&gt;&lt;h1&gt;&lt;a href=&quot;&lt;?php echo apply_filters('login_headerurl', network_home_url() ); ?&gt;&quot; title=&quot;&lt;?php echo apply_filters('login_headertitle', $current_site-&gt;site_name ); ?&gt;&quot;&gt;&lt;span class=&quot;hide&quot;&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
</ins><span class="cx"> &lt;?php   }
</span><span class="cx"> 
</span><span class="cx">         $message = apply_filters('login_message', $message);
</span><span class="lines">@@ -184,16 +184,10 @@
</span><span class="cx">                 $wpdb-&gt;update($wpdb-&gt;users, array('user_activation_key' =&gt; $key), array('user_login' =&gt; $user_login));
</span><span class="cx">         }
</span><span class="cx">         $message = __('Someone has asked to reset the password for the following site and username.') . &quot;\r\n\r\n&quot;;
</span><del>-        if ( !is_multisite() )
-                $message .= get_option('siteurl') . &quot;\r\n\r\n&quot;;
-        else
-                    $message .= 'http://' . trailingslashit( $current_site-&gt;domain . $current_site-&gt;path ) . &quot;\r\n\r\n&quot;;
</del><ins>+        $message .= network_site_url() . &quot;\r\n\r\n&quot;;
</ins><span class="cx">         $message .= sprintf(__('Username: %s'), $user_login) . &quot;\r\n\r\n&quot;;
</span><span class="cx">         $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . &quot;\r\n\r\n&quot;;
</span><del>-        if ( !is_multisite() )
-                $message .= site_url(&quot;wp-login.php?action=rp&amp;key=$key&amp;login=&quot; . rawurlencode($user_login), 'login') . &quot;\r\n&quot;;
-        else
-                $message .= 'http://' . trailingslashit( $current_site-&gt;domain . $current_site-&gt;path ) . &quot;wp-login.php?action=rp&amp;key=$key&amp;login=&quot; . rawurlencode($user_login) . &quot;\r\n&quot;;
</del><ins>+        $message .= network_site_url(&quot;wp-login.php?action=rp&amp;key=$key&amp;login=&quot; . rawurlencode($user_login), 'login') . &quot;\r\n&quot;;
</ins><span class="cx"> 
</span><span class="cx">         if ( is_multisite() )
</span><span class="cx">                 $blogname = $GLOBALS['current_site']-&gt;site_name;
</span></span></pre>
</div>
</div>

</body>
</html>