web/wp-activate.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
equal deleted inserted replaced
203:f507feede89a 204:09a1c134465b
     1 <?php
     1 <?php
       
     2 /**
       
     3  * Confirms that the activation key that is sent in an email after a user signs
       
     4  * up for a new blog matches the key for that user and then displays confirmation.
       
     5  *
       
     6  * @package WordPress
       
     7  */
       
     8 
       
     9 /** Define ABSPATH as this file's directory */
     2 define( 'WP_INSTALLING', true );
    10 define( 'WP_INSTALLING', true );
     3 
    11 
     4 /** Sets up the WordPress Environment. */
    12 /** Sets up the WordPress Environment. */
     5 require( dirname(__FILE__) . '/wp-load.php' );
    13 require( dirname(__FILE__) . '/wp-load.php' );
     6 
    14 
    14 if ( is_object( $wp_object_cache ) )
    22 if ( is_object( $wp_object_cache ) )
    15 	$wp_object_cache->cache_enabled = false;
    23 	$wp_object_cache->cache_enabled = false;
    16 
    24 
    17 do_action( 'activate_header' );
    25 do_action( 'activate_header' );
    18 
    26 
       
    27 /**
       
    28  * Adds an action hook specific to this page that fires on wp_head
       
    29  *
       
    30  * @since MU
       
    31  */
    19 function do_activate_header() {
    32 function do_activate_header() {
    20 	do_action( 'activate_wp_head' );
    33 	do_action( 'activate_wp_head' );
    21 }
    34 }
    22 add_action( 'wp_head', 'do_activate_header' );
    35 add_action( 'wp_head', 'do_activate_header' );
    23 
    36 
       
    37 /**
       
    38  * Loads styles specific to this page.
       
    39  *
       
    40  * @since MU
       
    41  */
    24 function wpmu_activate_stylesheet() {
    42 function wpmu_activate_stylesheet() {
    25 	?>
    43 	?>
    26 	<style type="text/css">
    44 	<style type="text/css">
    27 		form { margin-top: 2em; }
    45 		form { margin-top: 2em; }
    28 		#submit, #key { width: 90%; font-size: 24px; }
    46 		#submit, #key { width: 90%; font-size: 24px; }
    75 			    echo '<p>'.$result->get_error_message().'</p>';
    93 			    echo '<p>'.$result->get_error_message().'</p>';
    76 			}
    94 			}
    77 		} else {
    95 		} else {
    78 			extract($result);
    96 			extract($result);
    79 			$url = get_blogaddress_by_id( (int) $blog_id);
    97 			$url = get_blogaddress_by_id( (int) $blog_id);
    80 			$user = new WP_User( (int) $user_id);
    98 			$user = get_userdata( (int) $user_id);
    81 			?>
    99 			?>
    82 			<h2><?php _e('Your account is now active!'); ?></h2>
   100 			<h2><?php _e('Your account is now active!'); ?></h2>
    83 
   101 
    84 			<div id="signup-welcome">
   102 			<div id="signup-welcome">
    85 				<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
   103 				<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>