WordPress.org

Make WordPress Core

Changeset 12697 for trunk/wp-login.php


Ignore:
Timestamp:
01/11/2010 09:49:40 PM (10 years ago)
Author:
wpmuguru
Message:

merge in multisite login, wp-includes, See #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r12666 r12697  
    4040 */
    4141function login_header($title = 'Log In', $message = '', $wp_error = '') {
    42     global $error, $is_iphone, $interim_login;
     42    global $error, $is_iphone, $interim_login, $current_site;
    4343
    4444    // Don't index any of these forms
     
    7575</head>
    7676<body class="login">
    77 
     77<?php   if( !is_multisite() ) { ?>
    7878<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>
    79 <?php
     79<?php   } else { ?>
     80<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>
     81<?php   }
     82
    8083    $message = apply_filters('login_message', $message);
    8184    if ( !empty( $message ) ) echo $message . "\n";
     
    114117 */
    115118function retrieve_password() {
    116     global $wpdb;
     119    global $wpdb, $current_site;
    117120
    118121    $errors = new WP_Error();
     
    163166    }
    164167    $message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n";
    165     $message .= get_option('siteurl') . "\r\n\r\n";
     168        if( !is_multisite() ) {
     169            $message .= get_option('siteurl') . "\r\n\r\n";
     170        } else {
     171                $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "\r\n\r\n";
     172        }
    166173    $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
    167174    $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
    168     $message .= site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . "\r\n";
     175        if( !is_multisite() ) {
     176            $message .= site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . "\r\n";
     177        } else {
     178            $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login) . "\r\n";
     179        }
    169180
    170181    // The blogname option is escaped with esc_html on the way into the database in sanitize_option
     
    399410
    400411case 'register' :
     412        if( is_multisite() ) {
     413                // WPMU doesn't use this
     414                wp_redirect( apply_filters( 'wp_signup_location', get_bloginfo('wpurl') . '/wp-signup.php' ) );
     415                exit;
     416        }
    401417    if ( !get_option('users_can_register') ) {
    402418        wp_redirect('wp-login.php?registration=disabled');
Note: See TracChangeset for help on using the changeset viewer.