Commit 87d5e10d authored by lucha's avatar lucha

Wordpress 5.0.2

parent a2547a8e
......@@ -18,6 +18,50 @@ if ( !is_multisite() ) {
die();
}
$valid_error_codes = array( 'already_active', 'blog_taken' );
list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
$activate_cookie = 'wp-activate-' . COOKIEHASH;
$key = '';
$result = null;
if ( isset( $_GET['key'] ) && isset( $_POST['key'] ) && $_GET['key'] !== $_POST['key'] ) {
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 );
} elseif ( ! empty( $_GET['key'] ) ) {
$key = $_GET['key'];
} elseif ( ! empty( $_POST['key'] ) ) {
$key = $_POST['key'];
}
if ( $key ) {
$redirect_url = remove_query_arg( 'key' );
if ( $redirect_url !== remove_query_arg( false ) ) {
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
wp_safe_redirect( $redirect_url );
exit;
} else {
$result = wpmu_activate_signup( $key );
}
}
if ( $result === null && isset( $_COOKIE[ $activate_cookie ] ) ) {
$key = $_COOKIE[ $activate_cookie ];
$result = wpmu_activate_signup( $key );
setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
}
if ( $result === null || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
status_header( 404 );
} elseif ( is_wp_error( $result ) ) {
$error_code = $result->get_error_code();
if ( ! in_array( $error_code, $valid_error_codes ) ) {
status_header( 400 );
}
}
nocache_headers();
if ( is_object( $wp_object_cache ) )
......@@ -69,13 +113,14 @@ function wpmu_activate_stylesheet() {
<?php
}
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
add_action( 'wp_head', 'wp_sensitive_page_meta' );
get_header( 'wp-activate' );
?>
<div id="signup-content" class="widecolumn">
<div class="wp-activate-container">
<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
<?php if ( ! $key ) { ?>
<h2><?php _e('Activation Key Required') ?></h2>
<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
......@@ -89,42 +134,39 @@ get_header( 'wp-activate' );
</form>
<?php } else {
$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
$result = wpmu_activate_signup( $key );
if ( is_wp_error($result) ) {
if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
$signup = $result->get_error_data();
?>
<h2><?php _e('Your account is now active!'); ?></h2>
<?php
echo '<p class="lead-in">';
if ( $signup->domain . $signup->path == '' ) {
printf(
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
__( '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()
);
} else {
printf(
/* translators: 1: site URL, 2: username, 3: user email, 4: lost password URL */
__( '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>.' ),
sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
}
echo '</p>';
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
$signup = $result->get_error_data();
?>
<h2><?php _e( 'Your account is now active!' ); ?></h2>
<?php
echo '<p class="lead-in">';
if ( $signup->domain . $signup->path == '' ) {
printf(
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
__( '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()
);
} else {
?>
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
<p><?php echo $result->get_error_message(); ?></p>
<?php
printf(
/* translators: 1: site URL, 2: username, 3: user email, 4: lost password URL */
__( '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>.' ),
sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
}
echo '</p>';
} elseif ( $result === null || is_wp_error( $result ) ) {
?>
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
<?php if ( is_wp_error( $result ) ) : ?>
<p><?php echo $result->get_error_message(); ?></p>
<?php endif; ?>
<?php
} else {
$url = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
$user = get_userdata( (int) $result['user_id'] );
......
This diff is collapsed.
......@@ -67,7 +67,6 @@ $core_actions_post = array(
'get-post-thumbnail-html', 'get-community-events', 'edit-theme-plugin-file',
'wp-privacy-export-personal-data',
'wp-privacy-erase-personal-data',
'update-try-gutenberg-panel',
);
// Deprecated
......
......@@ -175,6 +175,15 @@ if ( is_network_admin() )
$admin_body_class .= ' no-customize-support no-svg';
if ( $current_screen->is_block_editor() ) {
// Default to is-fullscreen-mode to avoid jumps in the UI.
$admin_body_class .= ' block-editor-page is-fullscreen-mode wp-embed-responsive';
if ( current_theme_supports( 'editor-styles' ) && current_theme_supports( 'dark-editor-style' ) ) {
$admin_body_class .= ' is-dark-theme';
}
}
?>
</head>
<?php
......
......@@ -20,7 +20,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s will smooth your design workflow and keep you safe from coding errors.' ), $display_version ); ?></p>
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s introduces a robust new content creation experience.' ), $display_version ); ?></p>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
......
......@@ -40,17 +40,38 @@
.about-wrap hr {
border: 0;
height: 0;
margin: 0;
margin: 3em 0 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.about-wrap img {
margin: 0;
max-width: 100%;
width: 100%;
height: auto;
vertical-align: middle;
}
.about-wrap figure {
position: relative;
margin: 0;
}
.about-wrap .feature-section figure img {
margin-bottom: 0;
}
.about-wrap figcaption {
position: absolute;
bottom: 0;
width: 100%;
padding: 40px 10px 15px;
overflow: auto;
box-sizing: border-box;
background: linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.3) 60%,transparent);
font-weight: 600;
text-shadow: 0px 0px 5px rgba(0,0,0,.75);
}
.about-wrap .jetpack-video-wrapper {
margin-bottom: 0;
}
......@@ -132,25 +153,19 @@
color: #23282d;
}
.about-wrap .changelog h2 {
font-size: 1.4em;
font-weight: 600;
text-align: right;
}
.about-wrap .changelog h3 {
margin: 1.33em 0;
font-size: 1em;
line-height: inherit;
color: #23282d;
}
.about-wrap code,
.about-wrap ol li p {
font-size: 14px;
font-weight: 400;
}
.about-wrap figcaption {
font-size: 13px;
text-align: center;
color: white;
text-overflow: ellipsis;
}
.about-wrap .about-description,
.about-wrap .about-text {
margin-top: 1.4em;
......@@ -161,23 +176,20 @@
.about-wrap .about-text {
margin: 1em 0 1em 200px;
min-height: 60px;
color: #555d66;
}
/* 1.2 - Structure */
.about-wrap [class$="-col"] {
display: -webkit-box;
display: flex;
-webkit-box-pack: justify;
justify-content: space-between;
flex-wrap: wrap;
}
.about-wrap .feature-section.one-col {
margin: 0 auto;
max-width: 700px;
max-width: 680px;
}
.about-wrap .inline-svg img {
......@@ -191,7 +203,6 @@
}
.about-wrap [class$="-col"] .col {
-webkit-box-flex: 1;
flex: 1;
}
......@@ -200,13 +211,35 @@
max-width: 47%;
}
.about-wrap .three-col,
.about-wrap .four-col {
margin: auto;
max-width: 1020px;
}
.about-wrap .three-col .col {
-webkit-align-self: flex-start;
align-self: flex-start;
min-width: 31%;
max-width: 31%;
}
.about-wrap .four-col .col {
align-self: flex-start;
min-width: 23%;
max-width: 23%;
}
.about-wrap .feature-section.eight-col .col {
align-self: flex-start;
margin-top: 6px;
min-width: 12%;
max-width: 12%;
}
.about-wrap .one-col img {
margin: 1em 0 2em;
}
.about-wrap .two-col img {
margin-bottom: 1.5em;
}
......@@ -219,6 +252,18 @@
background: transparent; /* Hide loading.gif */
}
.about-wrap video {
margin: 1.5em auto;
}
.about-wrap .cta {
text-align: center;
}
.about-wrap .cta .button {
margin: 0 auto 5px;
font-weight: 600;
}
/* 1.3 - Point Releases */
.about-wrap .point-releases {
......@@ -259,9 +304,7 @@
}
.about-wrap .two-col-text {
-webkit-column-count: 2;
column-count: 2;
-webkit-column-gap: 40px;
column-gap: 40px;
}
......@@ -274,6 +317,10 @@
margin-bottom: 3em;
}
.about-wrap .under-the-hood img + h3 {
margin-top: 1.25em;
}
/* 2.2 - Structure */
.about-wrap .headline-feature.feature-video {
......@@ -300,7 +347,6 @@
.about-wrap .feature-section {
overflow: hidden;
padding: 0 0 40px;
}
.about-wrap .feature-section.no-heading {
......@@ -311,10 +357,6 @@
overflow: hidden;
}
.about-wrap .feature-section img {
margin-bottom: 1em;
}
.about-wrap .embed-container {
text-align: center;
}
......@@ -352,92 +394,6 @@
padding: 0 5px;
}
/* 2.3 Floating Header Layout */
.about-wrap .floating-header-section {
display: -ms-grid;
display: grid;
grid-gap: 0 60px;
-ms-grid-columns: 5fr 11fr;
grid-template-columns: 5fr 11fr;
max-width: 1020px;
margin: 0 auto 120px;
}
.about-wrap .floating-header-section .section-header {
-ms-grid-column: 1;
grid-column: 1;