Make WordPress Core

Ticket #25478: 25478.patch

File 25478.patch, 7.0 KB (added by ocean90, 12 years ago)
  • src/wp-activate.php

     
    6565?>
    6666
    6767<div id="content" class="widecolumn">
    68         <?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
     68        <div class="ms-activate-container">
     69                <?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
    6970
    70                 <h2><?php _e('Activation Key Required') ?></h2>
    71                 <form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
    72                         <p>
    73                             <label for="key"><?php _e('Activation Key:') ?></label>
    74                             <br /><input type="text" name="key" id="key" value="" size="50" />
    75                         </p>
    76                         <p class="submit">
    77                             <input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
    78                         </p>
    79                 </form>
     71                        <h2><?php _e('Activation Key Required') ?></h2>
     72                        <form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
     73                                <p>
     74                                    <label for="key"><?php _e('Activation Key:') ?></label>
     75                                    <br /><input type="text" name="key" id="key" value="" size="50" />
     76                                </p>
     77                                <p class="submit">
     78                                    <input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
     79                                </p>
     80                        </form>
    8081
    81         <?php } else {
     82                <?php } else {
    8283
    83                 $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
    84                 $result = wpmu_activate_signup($key);
    85                 if ( is_wp_error($result) ) {
    86                         if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
    87                             $signup = $result->get_error_data();
    88                                 ?>
    89                                 <h2><?php _e('Your account is now active!'); ?></h2>
    90                                 <?php
    91                                 echo '<p class="lead-in">';
    92                                 if ( $signup->domain . $signup->path == '' ) {
    93                                         printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. 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>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() );
     84                        $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
     85                        $result = wpmu_activate_signup($key);
     86                        if ( is_wp_error($result) ) {
     87                                if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
     88                                    $signup = $result->get_error_data();
     89                                        ?>
     90                                        <h2><?php _e('Your account is now active!'); ?></h2>
     91                                        <?php
     92                                        echo '<p class="lead-in">';
     93                                        if ( $signup->domain . $signup->path == '' ) {
     94                                                printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. 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>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() );
     95                                        } else {
     96                                                printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. 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>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() );
     97                                        }
     98                                        echo '</p>';
    9499                                } else {
    95                                         printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. 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>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() );
     100                                        ?>
     101                                        <h2><?php _e('An error occurred during the activation'); ?></h2>
     102                                        <?php
     103                                    echo '<p>'.$result->get_error_message().'</p>';
    96104                                }
    97                                 echo '</p>';
    98105                        } else {
     106                                extract($result);
     107                                $url = get_blogaddress_by_id( (int) $blog_id);
     108                                $user = get_userdata( (int) $user_id);
    99109                                ?>
    100                                 <h2><?php _e('An error occurred during the activation'); ?></h2>
    101                                 <?php
    102                             echo '<p>'.$result->get_error_message().'</p>';
    103                         }
    104                 } else {
    105                         extract($result);
    106                         $url = get_blogaddress_by_id( (int) $blog_id);
    107                         $user = get_userdata( (int) $user_id);
    108                         ?>
    109                         <h2><?php _e('Your account is now active!'); ?></h2>
     110                                <h2><?php _e('Your account is now active!'); ?></h2>
    110111
    111                         <div id="signup-welcome">
    112                                 <p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
    113                                 <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
    114                         </div>
     112                                <div id="signup-welcome">
     113                                        <p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
     114                                        <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
     115                                </div>
    115116
    116                         <?php if ( $url != network_home_url('', 'http') ) : ?>
    117                                 <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 else: ?>
    119                                 <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>
    120                         <?php endif;
     117                                <?php if ( $url != network_home_url('', 'http') ) : ?>
     118                                        <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>
     119                                <?php else: ?>
     120                                        <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>
     121                                <?php endif;
     122                        }
    121123                }
    122         }
    123         ?>
     124                ?>
     125        </div>
    124126</div>
    125127<script type="text/javascript">
    126128        var key_input = document.getElementById('key');
  • src/wp-signup.php

     
    7676do_action( 'before_signup_form' );
    7777?>
    7878<div id="content" class="widecolumn">
    79 <div class="mu_register">
     79<div class="mu_register ms-signup-container">
    8080<?php
    8181/**
    8282 * Generates and displays the Signup and Create Site forms