Changeset 13884
- Timestamp:
- 03/29/2010 09:45:31 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-activate.php
r13384 r13884 44 44 45 45 <h2><?php _e('Activation Key Required') ?></h2> 46 <form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php">46 <form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>"> 47 47 <p> 48 48 <label for="key"><?php _e('Activation Key:') ?></label> … … 65 65 <?php 66 66 if ( $signup->domain . $signup->path == '' ) { 67 printf(__('<p class="lead-in">Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s". 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 <a href="%4$s">reset your password</a>.</p>'), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword');67 printf(__('<p class="lead-in">Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s". 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 <a href="%4$s">reset your password</a>.</p>'), network_site_url('wp-login.php', 'login'), $signup->user_login, $signup->user_email, network_site_url('wp-login.php?action=lostpassword', 'login')); 68 68 } else { 69 printf(__('<p class="lead-in">Your site at <a href="%1$s">%2$s</a> is active. You may now login to your site using your chosen username of "%3$s". 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 <a href="%5$s">reset your password</a>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword');69 printf(__('<p class="lead-in">Your site at <a href="%1$s">%2$s</a> is active. You may now login to your site using your chosen username of "%3$s". 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 <a href="%5$s">reset your password</a>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, network_site_url('wp-login.php?action=lostpassword')); 70 70 } 71 71 } else { … … 87 87 </div> 88 88 89 <?php if ( $url != 'http://' . $current_site->domain . $current_site->path) : ?>89 <?php if ( $url != network_home_url('', 'http') ) : ?> 90 90 <p class="view"><?php printf(__('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p> 91 91 <?php else: ?> 92 <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path); ?></p>92 <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p> 93 93 <?php endif; 94 94 } -
trunk/wp-admin/includes/ms.php
r13835 r13884 250 250 251 251 function update_option_new_admin_email($old_value, $value) { 252 global $current_site;253 252 if ( $value == get_option( 'admin_email' ) || !is_email( $value ) ) 254 253 return; … … 277 276 ###SITEURL###"), $new_admin_email ); 278 277 279 $content = str_replace('###ADMIN_URL###', esc_url( get_option( "siteurl" ).'/wp-admin/options.php?adminhash='.$hash), $content);278 $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash='.$hash)), $content); 280 279 $content = str_replace('###EMAIL###', $value, $content); 281 280 $content = str_replace('###SITENAME###', get_site_option( 'site_name' ), $content); 282 $content = str_replace('###SITEURL###', 'http://' . $current_site->domain . $current_site->path, $content);281 $content = str_replace('###SITEURL###', network_home_url(), $content); 283 282 284 283 wp_mail( $value, sprintf(__('[%s] New Admin Email Address'), get_option('blogname')), $content ); … … 287 286 288 287 function send_confirmation_on_profile_email() { 289 global $errors, $wpdb, $current_user , $current_site;288 global $errors, $wpdb, $current_user; 290 289 if ( ! is_object($errors) ) 291 290 $errors = new WP_Error(); … … 328 327 ###SITEURL###"), $new_user_email ); 329 328 330 $content = str_replace('###ADMIN_URL###', esc_url( get_option( "siteurl" ).'/wp-admin/profile.php?newuseremail='.$hash), $content);329 $content = str_replace('###ADMIN_URL###', esc_url(admin_url('profile.php?newuseremail='.$hash)), $content); 331 330 $content = str_replace('###EMAIL###', $_POST[ 'email' ], $content); 332 331 $content = str_replace('###SITENAME###', get_site_option( 'site_name' ), $content); 333 $content = str_replace('###SITEURL###', 'http://' . $current_site->domain . $current_site->path, $content);332 $content = str_replace('###SITEURL###', network_home_url(), $content); 334 333 335 334 wp_mail( $_POST[ 'email' ], sprintf(__('[%s] New Email Address'), get_option('blogname')), $content ); … … 535 534 536 535 function redirect_user_to_blog() { 537 global $current_user , $current_site;536 global $current_user; 538 537 $c = 0; 539 538 if ( isset( $_GET[ 'c' ] ) ) … … 548 547 $dashboard_blog = get_dashboard_blog(); 549 548 if ( is_object( $blog ) ) { 550 $protocol = ( is_ssl() ? 'https://' : 'http://' ); 551 wp_redirect( $protocol . $blog->domain . $blog->path . 'wp-admin/?c=' . $c ); // redirect and count to 5, "just in case" 549 wp_redirect( get_admin_url($blog->blog_id, '?c=' . $c) ); // redirect and count to 5, "just in case" 552 550 exit; 553 551 } -
trunk/wp-admin/ms-options.php
r13796 r13884 85 85 <td><input name="admin_notice_feed" class="large-text" type="text" id="admin_notice_feed" value="<?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?>" size="80" /><br /> 86 86 <?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?><br /> 87 <?php if ( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site->domain . $current_site->path . 'feed/')88 echo __( "A good one to use would be the feed from your main site: " ) . 'http://' . $current_site->domain . $current_site->path . 'feed/'; ?></td>87 <?php if ( get_site_option( 'admin_notice_feed' ) != network_home_url('feed/', 'http') ) 88 echo __( "A good one to use would be the feed from your main site: " ) . network_home_url('feed/'); ?></td> 89 89 </tr> 90 90 </table> -
trunk/wp-includes/link-template.php
r13882 r13884 2038 2038 function network_site_url( $path = '', $scheme = null ) { 2039 2039 global $current_site; 2040 2041 if ( !is_multisite() ) 2042 return site_url($path, $scheme); 2043 2040 2044 $orig_scheme = $scheme; 2041 2045 if ( !in_array($scheme, array('http', 'https')) ) { … … 2076 2080 function network_home_url( $path = '', $scheme = null ) { 2077 2081 global $current_site; 2082 2083 if ( !is_multisite() ) 2084 return home_url($path, $scheme); 2085 2078 2086 $orig_scheme = $scheme; 2079 2087 -
trunk/wp-includes/ms-functions.php
r13715 r13884 675 675 // Send email with activation link. 676 676 if ( !is_subdomain_install() || $current_site->id != 1 ) 677 $activate_url = "http://" . $current_site->domain . $current_site->path . "wp-activate.php?key=$key";677 $activate_url = network_site_url("wp-activate.php?key=$key"); 678 678 else 679 $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; 679 $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo use *_url() API 680 680 681 681 $activate_url = esc_url($activate_url); … … 842 842 843 843 function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) { 844 global $current_site;845 844 if ( get_site_option( 'registrationnotification' ) != 'yes' ) 846 845 return false; … … 850 849 return false; 851 850 852 $options_site_url = esc_url( "http://{$current_site->domain}{$current_site->path}wp-admin/ms-options.php");851 $options_site_url = esc_url(network_admin_url('ms-options.php')); 853 852 854 853 switch_to_blog( $blog_id ); 855 854 $blogname = get_option( 'blogname' ); 856 $siteurl = get_option( 'siteurl');855 $siteurl = site_url(); 857 856 restore_current_blog(); 858 857 … … 869 868 870 869 function newuser_notify_siteadmin( $user_id ) { 871 global $current_site;872 873 870 if ( get_site_option( 'registrationnotification' ) != 'yes' ) 874 871 return false; … … 881 878 $user = new WP_User($user_id); 882 879 883 $options_site_url = esc_url( "http://{$current_site->domain}{$current_site->path}wp-admin/ms-options.php");880 $options_site_url = esc_url(network_admin_url('ms-options.php')); 884 881 $msg = sprintf(__("New User: %1s 885 882 Remote IP: %2s … … 1279 1276 if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = NOBLOGREDIRECT ) ) { 1280 1277 if ( $destination == '%siteurl%' ) 1281 $destination = $current_site->domain . $current_site->path;1278 $destination = network_home_url(); 1282 1279 wp_redirect( $destination ); 1283 1280 exit(); -
trunk/wp-login.php
r13490 r13884 86 86 <div id="login"><h1><a href="<?php echo apply_filters('login_headerurl', 'http://wordpress.org/'); ?>" title="<?php echo apply_filters('login_headertitle', __('Powered by WordPress')); ?>"><?php bloginfo('name'); ?></a></h1> 87 87 <?php } else { ?> 88 <div id="login"><h1><a href="<?php echo apply_filters('login_headerurl', 'http://' . $current_site->domain . $current_site->path); ?>" title="<?php echo apply_filters('login_headertitle', $current_site->site_name ); ?>"><span class="hide"><?php bloginfo('name'); ?></span></a></h1>88 <div id="login"><h1><a href="<?php echo apply_filters('login_headerurl', network_home_url() ); ?>" title="<?php echo apply_filters('login_headertitle', $current_site->site_name ); ?>"><span class="hide"><?php bloginfo('name'); ?></span></a></h1> 89 89 <?php } 90 90 … … 185 185 } 186 186 $message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n"; 187 if ( !is_multisite() ) 188 $message .= get_option('siteurl') . "\r\n\r\n"; 189 else 190 $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "\r\n\r\n"; 187 $message .= network_site_url() . "\r\n\r\n"; 191 188 $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; 192 189 $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n"; 193 if ( !is_multisite() ) 194 $message .= site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . "\r\n"; 195 else 196 $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login) . "\r\n"; 190 $message .= network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . "\r\n"; 197 191 198 192 if ( is_multisite() )
Note: See TracChangeset
for help on using the changeset viewer.