Skip to content

Commit 5850c59

Browse files
adrolligithub-actions[bot]
authored andcommitted
Fix styling
1 parent 5ebd811 commit 5850c59

File tree

1,096 files changed

+425174
-415502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,096 files changed

+425174
-415502
lines changed

public/wp/index.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
<?php
2+
23
/**
34
* Front to the WordPress application. This file doesn't do anything, but loads
45
* wp-blog-header.php which does and tells WordPress to load the theme.
5-
*
6-
* @package WordPress
76
*/
87

98
/**
109
* Tells WordPress to load the WordPress theme and output it.
1110
*
1211
* @var bool
1312
*/
14-
define( 'WP_USE_THEMES', true );
13+
define('WP_USE_THEMES', true);
1514

1615
/** Loads the WordPress Environment and Template */
17-
require __DIR__ . '/wp-blog-header.php';
16+
require __DIR__.'/wp-blog-header.php';

public/wp/wp-activate.php

Lines changed: 120 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,67 @@
22
/**
33
* Confirms that the activation key that is sent in an email after a user signs
44
* up for a new site matches the key for that user and then displays confirmation.
5-
*
6-
* @package WordPress
75
*/
8-
9-
define( 'WP_INSTALLING', true );
6+
define('WP_INSTALLING', true);
107

118
/** Sets up the WordPress Environment. */
12-
require __DIR__ . '/wp-load.php';
9+
require __DIR__.'/wp-load.php';
1310

14-
require __DIR__ . '/wp-blog-header.php';
11+
require __DIR__.'/wp-blog-header.php';
1512

16-
if ( ! is_multisite() ) {
17-
wp_redirect( wp_registration_url() );
18-
die();
13+
if (! is_multisite()) {
14+
wp_redirect(wp_registration_url());
15+
exit();
1916
}
2017

21-
$valid_error_codes = array( 'already_active', 'blog_taken' );
18+
$valid_error_codes = ['already_active', 'blog_taken'];
2219

23-
list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
24-
$activate_cookie = 'wp-activate-' . COOKIEHASH;
20+
[$activate_path] = explode('?', wp_unslash($_SERVER['REQUEST_URI']));
21+
$activate_cookie = 'wp-activate-'.COOKIEHASH;
2522

26-
$key = '';
23+
$key = '';
2724
$result = null;
2825

29-
if ( isset( $_GET['key'] ) && isset( $_POST['key'] ) && $_GET['key'] !== $_POST['key'] ) {
30-
wp_die( __( 'A key value mismatch has been detected. Please follow the link provided in your activation email.' ), __( 'An error occurred during the activation' ), 400 );
31-
} elseif ( ! empty( $_GET['key'] ) ) {
32-
$key = $_GET['key'];
33-
} elseif ( ! empty( $_POST['key'] ) ) {
34-
$key = $_POST['key'];
26+
if (isset($_GET['key']) && isset($_POST['key']) && $_GET['key'] !== $_POST['key']) {
27+
wp_die(__('A key value mismatch has been detected. Please follow the link provided in your activation email.'), __('An error occurred during the activation'), 400);
28+
} elseif (! empty($_GET['key'])) {
29+
$key = $_GET['key'];
30+
} elseif (! empty($_POST['key'])) {
31+
$key = $_POST['key'];
3532
}
3633

37-
if ( $key ) {
38-
$redirect_url = remove_query_arg( 'key' );
34+
if ($key) {
35+
$redirect_url = remove_query_arg('key');
3936

40-
if ( remove_query_arg( false ) !== $redirect_url ) {
41-
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
42-
wp_safe_redirect( $redirect_url );
43-
exit;
44-
} else {
45-
$result = wpmu_activate_signup( $key );
46-
}
37+
if (remove_query_arg(false) !== $redirect_url) {
38+
setcookie($activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true);
39+
wp_safe_redirect($redirect_url);
40+
exit;
41+
} else {
42+
$result = wpmu_activate_signup($key);
43+
}
4744
}
4845

49-
if ( null === $result && isset( $_COOKIE[ $activate_cookie ] ) ) {
50-
$key = $_COOKIE[ $activate_cookie ];
51-
$result = wpmu_activate_signup( $key );
52-
setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
46+
if ($result === null && isset($_COOKIE[$activate_cookie])) {
47+
$key = $_COOKIE[$activate_cookie];
48+
$result = wpmu_activate_signup($key);
49+
setcookie($activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true);
5350
}
5451

55-
if ( null === $result || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
56-
status_header( 404 );
57-
} elseif ( is_wp_error( $result ) ) {
58-
$error_code = $result->get_error_code();
52+
if ($result === null || (is_wp_error($result) && $result->get_error_code() === 'invalid_key')) {
53+
status_header(404);
54+
} elseif (is_wp_error($result)) {
55+
$error_code = $result->get_error_code();
5956

60-
if ( ! in_array( $error_code, $valid_error_codes, true ) ) {
61-
status_header( 400 );
62-
}
57+
if (! in_array($error_code, $valid_error_codes, true)) {
58+
status_header(400);
59+
}
6360
}
6461

6562
nocache_headers();
6663

67-
if ( is_object( $wp_object_cache ) ) {
68-
$wp_object_cache->cache_enabled = false;
64+
if (is_object($wp_object_cache)) {
65+
$wp_object_cache->cache_enabled = false;
6966
}
7067

7168
// Fix for page title.
@@ -76,7 +73,7 @@
7673
*
7774
* @since 3.0.0
7875
*/
79-
do_action( 'activate_header' );
76+
do_action('activate_header');
8077

8178
/**
8279
* Adds an action hook specific to this page.
@@ -85,25 +82,27 @@
8582
*
8683
* @since MU (3.0.0)
8784
*/
88-
function do_activate_header() {
89-
/**
90-
* Fires within the `<head>` section of the Site Activation page.
91-
*
92-
* Fires on the {@see 'wp_head'} action.
93-
*
94-
* @since 3.0.0
95-
*/
96-
do_action( 'activate_wp_head' );
85+
function do_activate_header()
86+
{
87+
/**
88+
* Fires within the `<head>` section of the Site Activation page.
89+
*
90+
* Fires on the {@see 'wp_head'} action.
91+
*
92+
* @since 3.0.0
93+
*/
94+
do_action('activate_wp_head');
9795
}
98-
add_action( 'wp_head', 'do_activate_header' );
96+
add_action('wp_head', 'do_activate_header');
9997

10098
/**
10199
* Loads styles specific to this page.
102100
*
103101
* @since MU (3.0.0)
104102
*/
105-
function wpmu_activate_stylesheet() {
106-
?>
103+
function wpmu_activate_stylesheet()
104+
{
105+
?>
107106
<style type="text/css">
108107
.wp-activate-container { width: 90%; margin: 0 auto; }
109108
.wp-activate-container form { margin-top: 2em; }
@@ -114,105 +113,105 @@ function wpmu_activate_stylesheet() {
114113
</style>
115114
<?php
116115
}
117-
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
118-
add_action( 'wp_head', 'wp_strict_cross_origin_referrer' );
119-
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
116+
add_action('wp_head', 'wpmu_activate_stylesheet');
117+
add_action('wp_head', 'wp_strict_cross_origin_referrer');
118+
add_filter('wp_robots', 'wp_robots_sensitive_page');
120119

121-
get_header( 'wp-activate' );
120+
get_header('wp-activate');
122121

123122
$blog_details = get_site();
124123
?>
125124

126125
<div id="signup-content" class="widecolumn">
127126
<div class="wp-activate-container">
128-
<?php if ( ! $key ) { ?>
127+
<?php if (! $key) { ?>
129128

130-
<h2><?php _e( 'Activation Key Required' ); ?></h2>
131-
<form name="activateform" id="activateform" method="post" action="<?php echo esc_url( network_site_url( $blog_details->path . 'wp-activate.php' ) ); ?>">
129+
<h2><?php _e('Activation Key Required'); ?></h2>
130+
<form name="activateform" id="activateform" method="post" action="<?php echo esc_url(network_site_url($blog_details->path.'wp-activate.php')); ?>">
132131
<p>
133-
<label for="key"><?php _e( 'Activation Key:' ); ?></label>
132+
<label for="key"><?php _e('Activation Key:'); ?></label>
134133
<br /><input type="text" name="key" id="key" value="" size="50" autofocus="autofocus" />
135134
</p>
136135
<p class="submit">
137-
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e( 'Activate' ); ?>" />
136+
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate'); ?>" />
138137
</p>
139138
</form>
140139

141140
<?php
142141
} else {
143-
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes, true ) ) {
144-
$signup = $result->get_error_data();
145-
?>
146-
<h2><?php _e( 'Your account is now active!' ); ?></h2>
142+
if (is_wp_error($result) && in_array($result->get_error_code(), $valid_error_codes, true)) {
143+
$signup = $result->get_error_data();
144+
?>
145+
<h2><?php _e('Your account is now active!'); ?></h2>
147146
<?php
148-
echo '<p class="lead-in">';
149-
if ( '' === $signup->domain . $signup->path ) {
150-
printf(
151-
/* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */
152-
__( '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>.' ),
153-
esc_url( network_site_url( $blog_details->path . 'wp-login.php', 'login' ) ),
154-
esc_html( $signup->user_login ),
155-
esc_html( $signup->user_email ),
156-
esc_url( wp_lostpassword_url() )
157-
);
158-
} else {
159-
printf(
160-
/* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */
161-
__( 'Your site at %1$s is active. You may now log in to your 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>.' ),
162-
sprintf( '<a href="http://%1$s">%1$s</a>', esc_url( $signup->domain . $blog_details->path ) ),
163-
esc_html( $signup->user_login ),
164-
esc_html( $signup->user_email ),
165-
esc_url( wp_lostpassword_url() )
166-
);
167-
}
168-
echo '</p>';
169-
} elseif ( null === $result || is_wp_error( $result ) ) {
170-
?>
171-
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
172-
<?php if ( is_wp_error( $result ) ) : ?>
173-
<p><?php echo esc_html( $result->get_error_message() ); ?></p>
174-
<?php endif; ?>
147+
echo '<p class="lead-in">';
148+
if ($signup->domain.$signup->path === '') {
149+
printf(
150+
/* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */
151+
__('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>.'),
152+
esc_url(network_site_url($blog_details->path.'wp-login.php', 'login')),
153+
esc_html($signup->user_login),
154+
esc_html($signup->user_email),
155+
esc_url(wp_lostpassword_url())
156+
);
157+
} else {
158+
printf(
159+
/* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */
160+
__('Your site at %1$s is active. You may now log in to your 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>.'),
161+
sprintf('<a href="http://%1$s">%1$s</a>', esc_url($signup->domain.$blog_details->path)),
162+
esc_html($signup->user_login),
163+
esc_html($signup->user_email),
164+
esc_url(wp_lostpassword_url())
165+
);
166+
}
167+
echo '</p>';
168+
} elseif ($result === null || is_wp_error($result)) {
169+
?>
170+
<h2><?php _e('An error occurred during the activation'); ?></h2>
171+
<?php if (is_wp_error($result)) { ?>
172+
<p><?php echo esc_html($result->get_error_message()); ?></p>
173+
<?php } ?>
175174
<?php
176-
} else {
177-
$url = isset( $result['blog_id'] ) ? esc_url( get_home_url( (int) $result['blog_id'] ) ) : '';
178-
$user = get_userdata( (int) $result['user_id'] );
179-
?>
180-
<h2><?php _e( 'Your account is now active!' ); ?></h2>
175+
} else {
176+
$url = isset($result['blog_id']) ? esc_url(get_home_url((int) $result['blog_id'])) : '';
177+
$user = get_userdata((int) $result['user_id']);
178+
?>
179+
<h2><?php _e('Your account is now active!'); ?></h2>
181180

182181
<div id="signup-welcome">
183-
<p><span class="h3"><?php _e( 'Username:' ); ?></span> <?php echo esc_html( $user->user_login ); ?></p>
184-
<p><span class="h3"><?php _e( 'Password:' ); ?></span> <?php echo esc_html( $result['password'] ); ?></p>
182+
<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo esc_html($user->user_login); ?></p>
183+
<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo esc_html($result['password']); ?></p>
185184
</div>
186185

187186
<?php
188-
if ( $url && network_home_url( '', 'http' ) !== $url ) :
189-
switch_to_blog( (int) $result['blog_id'] );
190-
$login_url = wp_login_url();
191-
restore_current_blog();
192-
?>
187+
if ($url && network_home_url('', 'http') !== $url) {
188+
switch_to_blog((int) $result['blog_id']);
189+
$login_url = wp_login_url();
190+
restore_current_blog();
191+
?>
193192
<p class="view">
194193
<?php
195-
/* translators: 1: Site URL, 2: Login URL. */
196-
printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), esc_url( $url ), esc_url( $login_url ) );
197-
?>
194+
/* translators: 1: Site URL, 2: Login URL. */
195+
printf(__('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>'), esc_url($url), esc_url($login_url));
196+
?>
198197
</p>
199-
<?php else : ?>
198+
<?php } else { ?>
200199
<p class="view">
201200
<?php
202-
printf(
203-
/* translators: 1: Login URL, 2: Network home URL. */
204-
__( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ),
205-
esc_url( network_site_url( $blog_details->path . 'wp-login.php', 'login' ) ),
206-
esc_url( network_home_url( $blog_details->path ) )
207-
);
208-
?>
201+
printf(
202+
/* translators: 1: Login URL, 2: Network home URL. */
203+
__('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.'),
204+
esc_url(network_site_url($blog_details->path.'wp-login.php', 'login')),
205+
esc_url(network_home_url($blog_details->path))
206+
);
207+
?>
209208
</p>
210209
<?php
211-
endif;
212-
}
210+
}
211+
}
213212
}
214-
?>
213+
?>
215214
</div>
216215
</div>
217216
<?php
218-
get_footer( 'wp-activate' );
217+
get_footer('wp-activate');

0 commit comments

Comments
 (0)