Skip to content
Newer
Older
100644 120 lines (105 sloc) 4.56 KB
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
1 <?php
a69abc1 Docs for wp-activate.php. props lgedeon. fixes #20429.
nacin authored Aug 6, 2012
2 /**
3 * Confirms that the activation key that is sent in an email after a user signs
4 * up for a new blog matchs the key for that user and then displays confirmation.
5 *
6 * @package WordPress
7 */
8
9 /** Define ABSPATH as this file's directory */
10f5e5f Use static strings and respect coding standards in wp-activate.php. F…
westi authored Apr 17, 2011
10 define( 'WP_INSTALLING', true );
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
11
12 /** Sets up the WordPress Environment. */
13 require( dirname(__FILE__) . '/wp-load.php' );
14
6ec7cb4 Use relative paths when including files, avoiding include_path. fixes…
nacin authored Apr 18, 2010
15 require( './wp-blog-header.php' );
70940e9 Redirect wp-activate.php to register when not multisite, See #11644
wpmuguru authored Jan 26, 2010
16
17 if ( !is_multisite() ) {
432f2a4 Use the api to build site urls. Props nacin.
westi authored Oct 27, 2010
18 wp_redirect( site_url( '/wp-login.php?action=register' ) );
70940e9 Redirect wp-activate.php to register when not multisite, See #11644
wpmuguru authored Jan 26, 2010
19 die();
20 }
21
f9a92c2 Coding style cleanups
ryan authored Jan 15, 2010
22 if ( is_object( $wp_object_cache ) )
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
23 $wp_object_cache->cache_enabled = false;
24
10f5e5f Use static strings and respect coding standards in wp-activate.php. F…
westi authored Apr 17, 2011
25 do_action( 'activate_header' );
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
26
a69abc1 Docs for wp-activate.php. props lgedeon. fixes #20429.
nacin authored Aug 6, 2012
27 /**
28 * Adds an action hook specific to this page that fires on wp_head
29 *
30 * @since MU
31 */
c644b16 add activate_wp_head hook to wp-activate.php, fixes #12166
wpmuguru authored Feb 13, 2010
32 function do_activate_header() {
10f5e5f Use static strings and respect coding standards in wp-activate.php. F…
westi authored Apr 17, 2011
33 do_action( 'activate_wp_head' );
c644b16 add activate_wp_head hook to wp-activate.php, fixes #12166
wpmuguru authored Feb 13, 2010
34 }
35 add_action( 'wp_head', 'do_activate_header' );
36
a69abc1 Docs for wp-activate.php. props lgedeon. fixes #20429.
nacin authored Aug 6, 2012
37 /**
38 * Loads styles specific to this page.
39 *
40 * @since MU
41 */
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
42 function wpmu_activate_stylesheet() {
43 ?>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
44 <style type="text/css">
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
45 form { margin-top: 2em; }
46 #submit, #key { width: 90%; font-size: 24px; }
47 #language { margin-top: .5em; }
48 .error { background: #f66; }
498c93c Revert [17327] and [15858]. Props markmcwilliams, JohnONolan, et al. …
ryan authored Jan 22, 2011
49 span.h3 { padding: 0 8px; font-size: 1.3em; font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; font-weight: bold; color: #333; }
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
50 </style>
51 <?php
52 }
53 add_action( 'wp_head', 'wpmu_activate_stylesheet' );
54
55 get_header();
56 ?>
57
58 <div id="content" class="widecolumn">
59 <?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
60
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
61 <h2><?php _e('Activation Key Required') ?></h2>
8e4859a Use network_*_url(). see #12736
ryan authored Mar 29, 2010
62 <form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
63 <p>
64 <label for="key"><?php _e('Activation Key:') ?></label>
65 <br /><input type="text" name="key" id="key" value="" size="50" />
66 </p>
c99f4a9 Revert [15830] for wp-activate.php. see #15064, fixes #15976.
nacin authored Dec 25, 2010
67 <p class="submit">
68 <input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
69 </p>
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
70 </form>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
71
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
72 <?php } else {
73
74 $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
75 $result = wpmu_activate_signup($key);
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
76 if ( is_wp_error($result) ) {
77 if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
78 $signup = $result->get_error_data();
79 ?>
80 <h2><?php _e('Your account is now active!'); ?></h2>
81 <?php
1e3b849 Take out opening and closing <p> tags from translation strings. Focus…
nbachiyski authored Apr 19, 2010
82 echo '<p class="lead-in">';
83 if ( $signup->domain . $signup->path == '' ) {
07ff8b2 Use one space, not two, after trailing punctuation. fixes #19537
ryan authored Dec 13, 2011
84 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() );
1e3b849 Take out opening and closing <p> tags from translation strings. Focus…
nbachiyski authored Apr 19, 2010
85 } else {
07ff8b2 Use one space, not two, after trailing punctuation. fixes #19537
ryan authored Dec 13, 2011
86 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() );
1e3b849 Take out opening and closing <p> tags from translation strings. Focus…
nbachiyski authored Apr 19, 2010
87 }
88 echo '</p>';
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
89 } else {
90 ?>
91 <h2><?php _e('An error occurred during the activation'); ?></h2>
92 <?php
93 echo '<p>'.$result->get_error_message().'</p>';
94 }
95 } else {
96 extract($result);
97 $url = get_blogaddress_by_id( (int) $blog_id);
7127ed1 Move most instances of new WP_User to get_userdata(). see #21120.
nacin authored Aug 3, 2012
98 $user = get_userdata( (int) $user_id);
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
99 ?>
100 <h2><?php _e('Your account is now active!'); ?></h2>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
101
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
102 <div id="signup-welcome">
103 <p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
104 <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
105 </div>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
106
8e4859a Use network_*_url(). see #12736
ryan authored Mar 29, 2010
107 <?php if ( $url != network_home_url('', 'http') ) : ?>
87f0661 A few "login" used as a verb fixes. props xibe. fixes #17335
markjaquith authored May 7, 2011
108 <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>
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
109 <?php else: ?>
87f0661 A few "login" used as a verb fixes. props xibe. fixes #17335
markjaquith authored May 7, 2011
110 <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>
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
111 <?php endif;
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
112 }
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
113 }
114 ?>
115 </div>
1e3b849 Take out opening and closing <p> tags from translation strings. Focus…
nbachiyski authored Apr 19, 2010
116 <script type="text/javascript">
117 var key_input = document.getElementById('key');
118 key_input && key_input.focus();
119 </script>
120 <?php get_footer(); ?>
Something went wrong with that request. Please try again.