Make WordPress Core


Ignore:
Timestamp:
10/03/2015 12:33:47 AM (10 years ago)
Author:
johnbillion
Message:

Use wp_login_url() for login links when signing up for a new blog or activating a new blog on Multisite.

Fixes #31495
Props GregLone for the intial patch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-activate.php

    r34213 r34790  
    116116            </div>
    117117
    118             <?php if ( $url && $url != network_home_url( '', 'http' ) ) : ?>
    119                 <p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>'), $url, $url . 'wp-login.php' ); ?></p>
     118            <?php if ( $url && $url != network_home_url( '', 'http' ) ) :
     119                switch_to_blog( (int) $result['blog_id'] );
     120                $login_url = wp_login_url();
     121                restore_current_blog();
     122                ?>
     123                <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) ); ?></p>
    120124            <?php else: ?>
    121125                <p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p>
Note: See TracChangeset for help on using the changeset viewer.