Commit d9d2a154 authored by lucha's avatar lucha

Wordpress 4.9

parent 18ba4e9f
......@@ -36,7 +36,7 @@ do_action( 'activate_header' );
*
* Fires on {@see 'wp_head'}.
*
* @since MU
* @since MU (3.0.0)
*/
function do_activate_header() {
/**
......@@ -53,7 +53,7 @@ add_action( 'wp_head', 'do_activate_header' );
/**
* Loads styles specific to this page.
*
* @since MU
* @since MU (3.0.0)
*/
function wpmu_activate_stylesheet() {
?>
......@@ -108,10 +108,9 @@ get_header( 'wp-activate' );
);
} else {
printf(
/* translators: 1: site URL, 2: site domain, 3: username, 4: user email, 5: lost password URL */
__( '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,
/* 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://%s">%s</a>', $signup->domain ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
......
This diff is collapsed.
......@@ -26,7 +26,7 @@ send_origin_headers();
// Require an action parameter
if ( empty( $_REQUEST['action'] ) )
die( '0' );
wp_die( '0', 400 );
/** Load WordPress Administration APIs */
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
......@@ -61,14 +61,15 @@ $core_actions_post = array(
'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor',
'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username', 'delete-plugin',
'search-plugins', 'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme',
'install-theme', 'get-post-thumbnail-html', 'get-community-events',
'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'crop-image',
'generate-password', 'save-wporg-username', 'delete-plugin', 'search-plugins',
'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme', 'install-theme',
'get-post-thumbnail-html', 'get-community-events', 'edit-theme-plugin-file',
);
// Deprecated
$core_actions_post[] = 'wp-fullscreen-save-post';
$core_actions_post_deprecated = array( 'wp-fullscreen-save-post', 'press-this-save-post', 'press-this-add-category' );
$core_actions_post = array_merge( $core_actions_post, $core_actions_post_deprecated );
// Register core Ajax calls.
if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get ) )
......@@ -80,6 +81,11 @@ if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_po
add_action( 'wp_ajax_nopriv_heartbeat', 'wp_ajax_nopriv_heartbeat', 1 );
if ( is_user_logged_in() ) {
// If no action is registered, return a Bad Request response.
if ( ! has_action( 'wp_ajax_' . $_REQUEST['action'] ) ) {
wp_die( '0', 400 );
}
/**
* Fires authenticated Ajax actions for logged-in users.
*
......@@ -90,6 +96,11 @@ if ( is_user_logged_in() ) {
*/
do_action( 'wp_ajax_' . $_REQUEST['action'] );
} else {
// If no action is registered, return a Bad Request response.
if ( ! has_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ) ) {
wp_die( '0', 400 );
}
/**
* Fires non-authenticated Ajax actions for logged-out users.
*
......@@ -101,4 +112,4 @@ if ( is_user_logged_in() ) {
do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] );
}
// Default status
die( '0' );
wp_die( '0' );
......@@ -87,6 +87,11 @@ auth_redirect();
if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() )
wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
// Schedule Transient cleanup.
if ( ! wp_next_scheduled( 'delete_expired_transients' ) && ! wp_installing() ) {
wp_schedule_event( time(), 'daily', 'delete_expired_transients' );
}
set_screen_options();
$date_format = __( 'F j, Y' );
......@@ -94,9 +99,6 @@ $time_format = __( 'g:i a' );
wp_enqueue_script( 'common' );
/**
* $pagenow is set in vars.php
* $wp_importers is sometimes set in wp-admin/includes/import.php
......
<?php
/**
* Server-side file upload handler from wp-plupload, swfupload or other asynchronous upload methods.
* Server-side file upload handler from wp-plupload or other asynchronous upload methods.
*
* @package WordPress
* @subpackage Administration
......@@ -14,20 +14,10 @@ if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
if ( defined('ABSPATH') )
require_once(ABSPATH . 'wp-load.php');
else
if ( defined( 'ABSPATH' ) ) {
require_once( ABSPATH . 'wp-load.php' );
} else {
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) {
// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) )
$_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie'];
unset($current_user);
}
require_once( ABSPATH . 'wp-admin/admin.php' );
......
......@@ -16,11 +16,11 @@ list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap about-wrap">
<div class="wrap about-wrap full-width-layout">
<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 adds more ways for you to express yourself and represent your brand.' ), $display_version ); ?></p>
<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>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
......@@ -28,8 +28,10 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab nav-tab-active"><?php _e( 'Credits' ); ?></a>
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
<a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
</h2>
<div class="about-wrap-content">
<?php
$credits = wp_credits();
......@@ -43,6 +45,7 @@ if ( ! $credits ) {
);
echo '</p>';
echo '</div>';
echo '</div>';
include( ABSPATH . 'wp-admin/admin-footer.php' );
exit;
}
......@@ -105,6 +108,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
);
?></p>
</div>
</div>
<?php
......@@ -115,7 +119,7 @@ return;
// These are strings returned by the API that we want to be translatable
__( 'Project Leaders' );
__( 'Core Contributors to WordPress %s' );
__( 'Contributing Developers' );
__( 'Noteworthy Contributors' );
__( 'Cofounder, Project Lead' );
__( 'Lead Developer' );
__( 'Release Lead' );
......
......@@ -8,6 +8,7 @@
2.0 About Page
2.1 Typography
2.2 Structure
2.3 Floating Header Layout
3.0 Credits & Freedoms Pages
------------------------------------------------------------------------------*/
......@@ -22,6 +23,14 @@
font-size: 15px;
}
.about-wrap.full-width-layout {
max-width: 1200px;
}
.about-wrap-content {
max-width: 1050px;
}
.about-wrap div.updated,
.about-wrap div.error,
.about-wrap .notice {
......@@ -51,7 +60,6 @@
.wp-badge {
background: #0073aa url(../images/w-logo-white.png?ver=20160308) no-repeat;
background-position: center 25px;
-webkit-background-size: 80px 80px;
background-size: 80px 80px;
color: #fff;
font-size: 14px;
......@@ -63,7 +71,6 @@
display: inline-block;
width: 140px;
text-rendering: optimizeLegibility;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2);
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
......@@ -161,23 +168,10 @@
/* 1.2 - Structure */
.about-wrap [class$="-col"] {
display: -ms-flexbox;
display: -webkit-flex;
display: -webkit-box;
display: -moz-box;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-moz-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-webkit-align-items: center;
-moz-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
......@@ -186,11 +180,18 @@
max-width: 700px;
}
.about-wrap .inline-svg img {
max-width: 100%;
width: 100%;
height: auto;
}
.about-wrap .inline-svg.full-width {
margin-bottom: 120px;
}
.about-wrap [class$="-col"] .col {
-webkit-flex: 1;
-ms-flex: 1;
-webkit-box-flex: 1;
-moz-box-flex: 1;
flex: 1;
}
......@@ -201,7 +202,6 @@
.about-wrap .three-col .col {
-webkit-align-self: flex-start;
-ms-flex-item-align: start;
align-self: flex-start;
min-width: 31%;
max-width: 31%;
......@@ -354,6 +354,92 @@
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;
position: relative;
min-width: 230px;
max-width: 300px;
}
.about-wrap .floating-header-section h2 {
margin: 0;
text-align: right;
position: absolute;
}
.about-wrap .floating-header-section .section-content {
-ms-grid-column: 2;
grid-column: 2;
display: -webkit-box;
display: flex;
-webkit-box-pack: justify;
justify-content: space-between;
-webkit-box-align: start;
align-items: flex-start;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
flex-flow: row wrap;
-webkit-box-flex: 2;
flex-grow: 2;
flex-shrink: 0;
}