Skip to content
Newer
Older
100644 102 lines (88 sloc) 4.24 KB
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
1 <?php
10f5e5f Use static strings and respect coding standards in wp-activate.php. F…
westi authored Apr 17, 2011
2 define( 'WP_INSTALLING', true );
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
3
4 /** Sets up the WordPress Environment. */
5 require( dirname(__FILE__) . '/wp-load.php' );
6
6ec7cb4 Use relative paths when including files, avoiding include_path. fixes…
nacin authored Apr 18, 2010
7 require( './wp-blog-header.php' );
70940e9 Redirect wp-activate.php to register when not multisite, See #11644
wpmuguru authored Jan 26, 2010
8
9 if ( !is_multisite() ) {
432f2a4 Use the api to build site urls. Props nacin.
westi authored Oct 27, 2010
10 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
11 die();
12 }
13
f9a92c2 Coding style cleanups
ryan authored Jan 15, 2010
14 if ( is_object( $wp_object_cache ) )
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
15 $wp_object_cache->cache_enabled = false;
16
10f5e5f Use static strings and respect coding standards in wp-activate.php. F…
westi authored Apr 17, 2011
17 do_action( 'activate_header' );
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
18
c644b16 add activate_wp_head hook to wp-activate.php, fixes #12166
wpmuguru authored Feb 13, 2010
19 function do_activate_header() {
10f5e5f Use static strings and respect coding standards in wp-activate.php. F…
westi authored Apr 17, 2011
20 do_action( 'activate_wp_head' );
c644b16 add activate_wp_head hook to wp-activate.php, fixes #12166
wpmuguru authored Feb 13, 2010
21 }
22 add_action( 'wp_head', 'do_activate_header' );
23
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
24 function wpmu_activate_stylesheet() {
25 ?>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
26 <style type="text/css">
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
27 form { margin-top: 2em; }
28 #submit, #key { width: 90%; font-size: 24px; }
29 #language { margin-top: .5em; }
30 .error { background: #f66; }
498c93c Revert [17327] and [15858]. Props markmcwilliams, JohnONolan, et al. …
ryan authored Jan 22, 2011
31 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
32 </style>
33 <?php
34 }
35 add_action( 'wp_head', 'wpmu_activate_stylesheet' );
36
37 get_header();
38 ?>
39
40 <div id="content" class="widecolumn">
41 <?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
42
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
43 <h2><?php _e('Activation Key Required') ?></h2>
8e4859a Use network_*_url(). see #12736
ryan authored Mar 29, 2010
44 <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
45 <p>
46 <label for="key"><?php _e('Activation Key:') ?></label>
47 <br /><input type="text" name="key" id="key" value="" size="50" />
48 </p>
c99f4a9 Revert [15830] for wp-activate.php. see #15064, fixes #15976.
nacin authored Dec 25, 2010
49 <p class="submit">
50 <input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
51 </p>
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
52 </form>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
53
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
54 <?php } else {
55
56 $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
57 $result = wpmu_activate_signup($key);
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
58 if ( is_wp_error($result) ) {
59 if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
60 $signup = $result->get_error_data();
61 ?>
62 <h2><?php _e('Your account is now active!'); ?></h2>
63 <?php
1e3b849 Take out opening and closing <p> tags from translation strings. Focus…
nbachiyski authored Apr 19, 2010
64 echo '<p class="lead-in">';
65 if ( $signup->domain . $signup->path == '' ) {
7944bd5 These are not verbs. http://notaverb.com/badbad_verbs
markjaquith authored Jul 27, 2010
66 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, network_site_url( 'wp-login.php?action=lostpassword', 'login' ) );
1e3b849 Take out opening and closing <p> tags from translation strings. Focus…
nbachiyski authored Apr 19, 2010
67 } else {
68 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, network_site_url( 'wp-login.php?action=lostpassword' ) );
69 }
70 echo '</p>';
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
71 } else {
72 ?>
73 <h2><?php _e('An error occurred during the activation'); ?></h2>
74 <?php
75 echo '<p>'.$result->get_error_message().'</p>';
76 }
77 } else {
78 extract($result);
79 $url = get_blogaddress_by_id( (int) $blog_id);
80 $user = new WP_User( (int) $user_id);
81 ?>
82 <h2><?php _e('Your account is now active!'); ?></h2>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
83
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
84 <div id="signup-welcome">
85 <p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
86 <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
87 </div>
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
88
8e4859a Use network_*_url(). see #12736
ryan authored Mar 29, 2010
89 <?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
90 <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
91 <?php else: ?>
87f0661 A few "login" used as a verb fixes. props xibe. fixes #17335
markjaquith authored May 7, 2011
92 <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
93 <?php endif;
6da55f7 Trailing whitespace cleanup
ryan authored Jan 15, 2010
94 }
336bec5 Set svn-eolstyle on some files. See #11644.
westi authored Jan 6, 2010
95 }
96 ?>
97 </div>
1e3b849 Take out opening and closing <p> tags from translation strings. Focus…
nbachiyski authored Apr 19, 2010
98 <script type="text/javascript">
99 var key_input = document.getElementById('key');
100 key_input && key_input.focus();
101 </script>
102 <?php get_footer(); ?>
Something went wrong with that request. Please try again.