Commit 6ac5df99 authored by alain's avatar alain 🐙
Browse files

update wp 5.9

parent f3a8ea52
WordPress - Web publishing software
Copyright 2011-2021 by the contributors
Copyright 2011-2022 by the contributors
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
......@@ -51,14 +51,14 @@
<h2>System Requirements</h2>
<ul>
<li><a href="https://secure.php.net/">PHP</a> version <strong>5.6.20</strong> or higher.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or higher.</li>
<li><a href="https://secure.php.net/">PHP</a> version <strong>5.6.20</strong> or greater.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or greater.</li>
</ul>
<h3>Recommendations</h3>
<ul>
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.4</strong> or higher.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.6</strong> or higher.</li>
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.4</strong> or greater.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.7</strong> or greater OR <a href="https://mariadb.org/">MariaDB</a> version <strong>10.2</strong> or greater.</li>
<li>The <a href="https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
<li><a href="https://wordpress.org/news/2016/12/moving-toward-ssl/">HTTPS</a> support.</li>
<li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
......
This diff is collapsed.
......@@ -22,9 +22,10 @@ if ( ! defined( 'WP_ADMIN' ) ) {
* @global string $update_title
* @global int $total_update_count
* @global string $parent_file
* @global string $typenow
*/
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow,
$update_title, $total_update_count, $parent_file;
$update_title, $total_update_count, $parent_file, $typenow;
// Catch plugins that include admin-header.php before admin.php completes.
if ( empty( $current_screen ) ) {
......@@ -48,8 +49,23 @@ if ( $admin_title === $title ) {
/* translators: Admin screen title. %s: Admin screen name. */
$admin_title = sprintf( __( '%s &#8212; WordPress' ), $title );
} else {
$screen_title = $title;
if ( 'post' === $current_screen->base && 'add' !== $current_screen->action ) {
$post_title = get_the_title();
if ( ! empty( $post_title ) ) {
$post_type_obj = get_post_type_object( $typenow );
$screen_title = sprintf(
/* translators: Editor admin screen title. 1: "Edit item" text for the post type, 2: Post title. */
__( '%1$s &#8220;%2$s&#8221;' ),
$post_type_obj->labels->edit_item,
$post_title
);
}
}
/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
$admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
$admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $screen_title, $admin_title );
}
if ( wp_is_recovery_mode() ) {
......@@ -81,7 +97,7 @@ wp_enqueue_script( 'svg-painter' );
$admin_body_class = preg_replace( '/[^a-z0-9_-]+/i', '-', $hook_suffix );
?>
<script type="text/javascript">
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(document).ready(func);else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
typenow = '<?php echo esc_js( $current_screen->post_type ); ?>',
......@@ -132,7 +148,7 @@ do_action( 'admin_print_scripts' );
/**
* Fires in head section for a specific admin page.
*
* The dynamic portion of the hook, `$hook_suffix`, refers to the hook suffix
* The dynamic portion of the hook name, `$hook_suffix`, refers to the hook suffix
* for the admin page.
*
* @since 2.1.0
......
......@@ -320,13 +320,24 @@ if ( isset( $plugin_page ) ) {
*
* The dynamic portion of the hook name, `$importer`, refers to the importer slug.
*
* Possible hook names include:
*
* - `load-importer-blogger`
* - `load-importer-wpcat2tag`
* - `load-importer-livejournal`
* - `load-importer-mt`
* - `load-importer-rss`
* - `load-importer-tumblr`
* - `load-importer-wordpress`
*
* @since 3.5.0
*/
do_action( "load-importer-{$importer}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
// Used in the HTML title tag.
$title = __( 'Import' );
$parent_file = 'tools.php';
$submenu_file = 'import.php';
$title = __( 'Import' );
if ( ! isset( $_GET['noheader'] ) ) {
require_once ABSPATH . 'wp-admin/admin-header.php';
......
......@@ -62,6 +62,7 @@ if ( isset( $_POST['action'] ) && 'authorize_application_password' === $_POST['a
}
}
// Used in the HTML title tag.
$title = __( 'Authorize Application' );
$app_name = ! empty( $_REQUEST['app_name'] ) ? $_REQUEST['app_name'] : '';
......@@ -90,7 +91,7 @@ if ( is_wp_error( $is_valid ) ) {
if ( wp_is_site_protected_by_basic_auth( 'front' ) ) {
wp_die(
__( 'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.' ),
__( 'Your website appears to use Basic Authentication, which is not currently compatible with application passwords.' ),
__( 'Cannot Authorize Application' ),
array(
'response' => 501,
......@@ -147,13 +148,13 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<?php
printf(
/* translators: %s: Application name. */
__( 'Would you like to give the application identifying itself as %s access to your account? You should only do this if you trust the app in question.' ),
__( 'Would you like to give the application identifying itself as %s access to your account? You should only do this if you trust the application in question.' ),
'<strong>' . esc_html( $app_name ) . '</strong>'
);
?>
</p>
<?php else : ?>
<p><?php _e( 'Would you like to give this application access to your account? You should only do this if you trust the app in question.' ); ?></p>
<p><?php _e( 'Would you like to give this application access to your account? You should only do this if you trust the application in question.' ); ?></p>
<?php endif; ?>
<?php
......@@ -224,7 +225,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<div class="form-field">
<label for="app_name"><?php _e( 'New Application Password Name' ); ?></label>
<input type="text" id="app_name" name="app_name" value="<?php echo esc_attr( $app_name ); ?>" placeholder="<?php esc_attr_e( 'WordPress App on My Phone' ); ?>" required />
<input type="text" id="app_name" name="app_name" value="<?php echo esc_attr( $app_name ); ?>" required />
</div>
<?php
......@@ -247,7 +248,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<?php
submit_button(
__( 'Yes, I approve of this connection.' ),
__( 'Yes, I approve of this connection' ),
'primary',
'approve',
false,
......@@ -262,7 +263,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
printf(
/* translators: %s: The URL the user is being redirected to. */
__( 'You will be sent to %s' ),
'<strong><kbd>' . esc_html(
'<strong><code>' . esc_html(
add_query_arg(
array(
'site_url' => site_url(),
......@@ -271,7 +272,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
),
$success_url
)
) . '</kbd></strong>'
) . '</code></strong>'
);
} else {
_e( 'You will be given a password to manually enter into the application in question.' );
......@@ -281,7 +282,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<?php
submit_button(
__( 'No, I do not approve of this connection.' ),
__( 'No, I do not approve of this connection' ),
'secondary',
'reject',
false,
......@@ -296,7 +297,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
printf(
/* translators: %s: The URL the user is being redirected to. */
__( 'You will be sent to %s' ),
'<strong><kbd>' . esc_html( $reject_url ) . '</kbd></strong>'
'<strong><code>' . esc_html( $reject_url ) . '</code></strong>'
);
} else {
_e( 'You will be returned to the WordPress Dashboard, and no changes will be made.' );
......
......@@ -53,6 +53,7 @@ if ( isset( $_REQUEST['c'] ) ) {
switch ( $action ) {
case 'editcomment':
// Used in the HTML title tag.
$title = __( 'Edit Comment' );
get_current_screen()->add_help_tab(
......@@ -96,6 +97,7 @@ switch ( $action ) {
case 'approve':
case 'trash':
case 'spam':
// Used in the HTML title tag.
$title = __( 'Moderate Comment' );
if ( ! $comment ) {
......
......@@ -10,6 +10,7 @@
require_once __DIR__ . '/admin.php';
require_once __DIR__ . '/includes/credits.php';
// Used in the HTML title tag.
$title = __( 'Credits' );
list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
......@@ -28,7 +29,13 @@ $credits = wp_credits();
</div>
<div class="about__header-text">
<?php _e( 'WordPress 5.8 was created by a worldwide team of passionate individuals' ); ?>
<?php
printf(
/* translators: %s: Version number. */
__( 'WordPress %s was created by a worldwide team of passionate individuals' ),
$display_version
);
?>
</div>
<nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
......
......@@ -30,7 +30,7 @@
/* Accent colors: used in header, on special classes. */
--accent-1: #3858e9; /* Accent background, link color */
--accent-2: #2d46ba; /* Header background */
--accent-2: #3858e9; /* Header background */
/* Navigation colors. */
--nav-background: #fff;
......@@ -141,25 +141,19 @@
margin: 0 0 var(--gap);
}
.about__section .column {
.about__section .column:not(.is-edge-to-edge) {
padding: var(--gap);
}
.about__section + .about__section .column {
padding-top: 0;
}
.about__section + .about__section .is-section-header {
padding-bottom: var(--gap);
}
.about__section .column[class*="background-color"],
.about__section:where([class*="background-color"]) .column,
.about__section .column.has-border {
padding-top: var(--gap);
}
.about__section .column.is-edge-to-edge {
padding: 0;
padding-bottom: var(--gap);
}
.about__section .column p:first-of-type {
......@@ -215,7 +209,8 @@
}
.about__section.has-gutters {
gap: calc(var(--gap) / 2);
gap: var(--gap);
margin-bottom: calc(var(--gap) * 2);
}
.about__section.has-2-columns {
......@@ -223,11 +218,11 @@
}
.about__section.has-2-columns.is-wider-right {
grid-template-columns: 1fr 2fr;
grid-template-columns: 2fr 3fr;
}
.about__section.has-2-columns.is-wider-left {
grid-template-columns: 2fr 1fr;
grid-template-columns: 3fr 2fr;
}
.about__section.has-2-columns .is-section-header {
......@@ -329,13 +324,24 @@
.about__section.has-2-columns.is-wider-left,
.about__section.has-3-columns {
display: block;
padding-bottom: calc(var(--gap) / 2);
margin-bottom: calc(var(--gap) / 2);
}
.about__section .column:not(.is-edge-to-edge) {
padding-top: var(--gap);
padding-bottom: var(--gap);
}
.about__section.has-2-columns.has-gutters.is-wider-right,
.about__section.has-2-columns.has-gutters.is-wider-left,
.about__section.has-3-columns.has-gutters {
margin-bottom: calc(var(--gap) * 2);
}
.about__section.has-2-columns.has-gutters .column,
.about__section.has-2-columns.has-gutters .column,
.about__section.has-3-columns.has-gutters .column {
margin-bottom: calc(var(--gap) / 2);
margin-bottom: var(--gap);
}
.about__section.has-2-columns.has-gutters .column:last-child,
......@@ -394,21 +400,25 @@
@media screen and (max-width: 600px) {
.about__section.has-2-columns {
display: block;
margin-bottom: var(--gap);
}
.about__section.has-2-columns:not(.has-gutters) .column:nth-of-type(n) {
padding-top: calc(var(--gap) / 2);
padding-bottom: calc(var(--gap) / 2);
}
.about__section.has-2-columns.has-gutters {
margin-bottom: calc(var(--gap) * 2);
}
.about__section.has-2-columns.has-gutters .column {
margin-bottom: calc(var(--gap) / 2);
margin-bottom: var(--gap);
}
.about__section.has-2-columns.has-gutters .column:last-child {
margin-bottom: 0;
}
.about__section.has-2-columns .column:nth-of-type(n) {
padding-top: calc(var(--gap) / 2);
padding-bottom: calc(var(--gap) / 2);
}
}
@media screen and (max-width: 480px) {
......@@ -471,6 +481,11 @@
line-height: inherit;
}
.about__container p.is-subheading {
margin-top: 0;
font-size: 1.8em;
}
.about__section a {
color: var(--accent-1);
text-decoration: underline;
......@@ -524,46 +539,6 @@
margin-left: auto;
}
.about__container .about__image-comparison {
position: relative;
display: inline-block;
max-width: 100%;
}
.about__container .about__image-comparison img {
-webkit-user-select: none;
user-select: none;
width: auto;
max-width: none;
max-height: 100%;
}
.about__container .about__image-comparison > img {
max-width: 100%;
}
.about__container .about__image-comparison-resize {
position: absolute !important; /* Needed to override inline style on ResizableBox */
top: 0;
bottom: 0;
right: 0;
width: 50%;
max-width: 100%;
}
.about__container .about__image-comparison.no-js .about__image-comparison-resize {
overflow: hidden;
border-left: 2px solid var(--wp-admin-theme-color);
}
.about__container .about__image-comparison-resize .components-resizable-box__side-handle::before {
width: 4px;
left: calc(50% - 2px);
transition: none;
animation: none;
opacity: 1;
}
.about__container .about__image + h3 {
margin-top: 1.5em;
}
......@@ -612,25 +587,46 @@
/* 1.3 - Header */
.about__header {
position: relative;
margin-bottom: var(--gap);
padding-top: 0;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('../images/about-header-about.svg');
background-image: url('../images/about-texture.png');
background-color: var(--accent-2);
background-size: 500px 500px;
background-blend-mode: overlay;
color: var(--text-light);
}
.credits-php .about__header {
.about__header::before {
content: "";
position: absolute;
top: 0;
left: 64px;
z-index: 0;
width: 300px;
height: 382px;
background: url(../images/about-header-about.svg) no-repeat center;
background-size: contain;
}
.credits-php .about__header::before {
top: auto;
bottom: 70px;
height: 310px;
background-image: url('../images/about-header-credits.svg');
}
.freedoms-php .about__header {
.freedoms-php .about__header::before {
top: calc(50% - 182px);
left: 32px;
width: 375px;
height: 300px;
background-image: url('../images/about-header-freedoms.svg');
}
.privacy-php .about__header {
.privacy-php .about__header::before {
top: auto;
bottom: -16px;
background-image: url('../images/about-header-privacy.svg');
}
......@@ -639,7 +635,9 @@
}
.about__header-title {
padding: 2rem 0 0;
box-sizing: border-box;
/* 380px = 300px (balloon width) + 64px (offset from edge) + 16px (spacing). */
padding: 6rem 0 0 380px;
margin: 0 2rem;
}
......@@ -652,14 +650,24 @@
}
.about__header-text {
max-width: 42rem;
margin: 0 0 5em;
padding: 0 2rem;
font-size: 2rem;
box-sizing: border-box;
margin: 0 0 7rem;
/* 380px = 300px (balloon width) + 64px (offset from edge) + 16px (spacing). */
padding: 0 2rem 0 380px;
font-size: 1.6rem;
line-height: 1.15;
}
.freedoms-php .about__header-title,
.freedoms-php .about__header-text {
/* 423px = 375px (balloon width) + 32px (offset from edge) + 16px (spacing). */
padding-left: 423px;
margin-left: 0;
}
.about__header-navigation {
position: relative;
z-index: 1;
display: flex;
justify-content: center;
padding-top: 0;
......@@ -708,6 +716,27 @@
}
@media screen and (max-width: 782px) {
.about__header::before {
width: 240px;
height: 305px;
left: 32px;
}
.credits-php .about__header::before {
height: 248px;
}
.freedoms-php .about__header::before {
top: calc(50% - 132px);
height: 192px;
width: 240px;
}
.privacy-php .about__header::before {
bottom: 0;
height: 280px;
}
.about__container .about__header-text {
font-size: 1.4em;
}
......@@ -716,13 +745,24 @@
display: block;
}
.about__header-title,
.about__header-text {
/* 288px = 240px (balloon width) + 32px (offset from edge) + 16px (spacing). */
padding-left: 288px !important;
}
.about__header-title,
.about__header-image {
margin-right: calc(var(--gap) / 2);
margin-left: calc(var(--gap) / 2);
}
.about__header-text,
.about__header-text {
margin-top: 0;
margin-left: 0;
padding-right: calc(var(--gap) / 2);
}
.about__header-navigation .nav-tab {
margin-top: 0;
margin-left: 0;
......@@ -731,13 +771,28 @@
}
}
@media screen and (max-width: 600px) {
.about__header::before {
display: none;
}
.about__header-title,
.about__header-text {
padding-left: calc(var(--gap) / 2) !important;
}
}
@media screen and (max-width: 480px) {
.about__header-title p {
font-size: 2.4em;
}
.about__header-title {
padding-top: 2rem;
}
.about__header-text {
margin-bottom: 1em;
margin-bottom: 2rem;
}
.about__header-navigation {
......
This diff is collapsed.
......@@ -29,7 +29,7 @@
/* Accent colors: used in header, on special classes. */
--accent-1: #3858e9; /* Accent background, link color */
--accent-2: #2d46ba; /* Header background */
--accent-2: #3858e9; /* Header background */
/* Navigation colors. */
--nav-background: #fff;
......@@ -140,25 +140,19 @@
margin: 0 0 var(--gap);
}
.about__section .column {
.about__section .column:not(.is-edge-to-edge) {
padding: var(--gap);
}
.about__section + .about__section .column {
padding-top: 0;
}
.about__section + .about__section .is-section-header {
padding-bottom: var(--gap);
}
.about__section .column[class*="background-color"],
.about__section:where([class*="background-color"]) .column,
.about__section .column.has-border {