Commit 5f5744ae authored by agata's avatar agata

wordpress core update 5.4.2

parent 659f9a0f
......@@ -40,9 +40,42 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
</nav>
</div>
<div class="about__section is-feature has-accent-background-color">
<h1><?php _e( 'Say hello to more and better.' ); ?></h1>
<p><?php _e( 'More ways to make your pages come alive. With easier ways to get it all done and looking better than ever&mdash;and boosts in speed you can feel.' ); ?></p>
</div>
<hr />
<div class="about__section changelog">
<div class="column">
<h2><?php _e( 'Maintenance and Security Releases' ); ?></h2>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */
_n(
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.',
23
),
'5.4.2',
number_format_i18n( 23 )
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.4.2' )
)
);
?>
</p>
<p>
<?php
printf(
......@@ -73,14 +106,6 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<hr />
<div class="about__section is-feature has-accent-background-color">
<h1><?php _e( 'Say hello to more and better.' ); ?></h1>
<p><?php _e( 'More ways to make your pages come alive. With easier ways to get it all done and looking better than ever&mdash;and boosts in speed you can feel.' ); ?></p>
</div>
<hr />
<div class="about__section has-2-columns has-subtle-background-color">
<h2 class="is-section-header">
<?php
......
......@@ -3923,8 +3923,7 @@ img {
}
.fileedit-sub input[type="submit"] {
margin-bottom: 0px;
padding: 0px 18px;
margin-bottom: 0;
}
#documentation label[for="docs-list"] {
......@@ -3938,7 +3937,6 @@ img {
#documentation input[type="button"] {
margin-bottom: 0;
padding: 8px 18px;
}
#wpfooter {
......
This diff is collapsed.
......@@ -3922,8 +3922,7 @@ img {
}
.fileedit-sub input[type="submit"] {
margin-bottom: 0px;
padding: 0px 18px;
margin-bottom: 0;
}
#documentation label[for="docs-list"] {
......@@ -3937,7 +3936,6 @@ img {
#documentation input[type="button"] {
margin-bottom: 0;
padding: 8px 18px;
}
#wpfooter {
......
This diff is collapsed.
wp-admin/images/w-logo-blue.png

4.02 KB | W: | H:

wp-admin/images/w-logo-blue.png

3.04 KB | W: | H:

wp-admin/images/w-logo-blue.png
wp-admin/images/w-logo-blue.png
wp-admin/images/w-logo-blue.png
wp-admin/images/w-logo-blue.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -719,7 +719,7 @@ class WP_Site_Health {
sprintf(
/* translators: %s: The minimum recommended PHP version. */
__( 'PHP is the programming language used to build and maintain WordPress. Newer versions of PHP are faster and more secure, so staying up to date will help your site&#8217;s overall performance and security. The minimum recommended version of PHP is %s.' ),
$response['recommended_version']
$response ? $response['recommended_version'] : ''
)
),
'actions' => sprintf(
......@@ -2289,7 +2289,13 @@ class WP_Site_Health {
}
if ( ! is_wp_error( $result_fetch ) ) {
$results[] = json_decode( wp_remote_retrieve_body( $result_fetch ) );
$result = json_decode( wp_remote_retrieve_body( $result_fetch ), true );
} else {
$result = false;
}
if ( is_array( $result ) ) {
$results[] = $result;
} else {
$results[] = array(
'status' => 'recommended',
......
......@@ -507,13 +507,14 @@ class WP_Terms_List_Table extends WP_List_Table {
* Filters the action links displayed for each term in the Tags list table.
*
* @since 2.8.0
* @deprecated 3.0.0 Use {@see '{$taxonomy}_row_actions'} instead.
* @since 3.0.0 Deprecated in favor of {@see '{$taxonomy}_row_actions'} filter.
* @since 5.4.2 Restored (un-deprecated).
*
* @param string[] $actions An array of action links to be displayed. Default
* 'Edit', 'Quick Edit', 'Delete', and 'View'.
* @param WP_Term $tag Term object.
*/
$actions = apply_filters_deprecated( 'tag_row_actions', array( $actions, $tag ), '3.0.0', '{$taxonomy}_row_actions' );
$actions = apply_filters( 'tag_row_actions', $actions, $tag );
/**
* Filters the action links displayed for each term in the terms list table.
......
......@@ -3231,7 +3231,7 @@ function edit_form_image_editor( $post ) {
?>
</label>
<?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
<?php wp_editor( format_to_edit( $post->post_content ), 'attachment_content', $editor_args ); ?>
</div>
<?php
......
......@@ -686,23 +686,46 @@ function set_screen_options() {
}
break;
default:
if ( '_page' === substr( $option, -5 ) || 'layout_columns' === $option ) {
/**
* Filters a screen option value before it is set.
*
* The filter can also be used to modify non-standard [items]_per_page
* settings. See the parent function for a full list of standard options.
*
* Returning false to the filter will skip saving the current option.
*
* @since 2.8.0
* @since 5.4.2 Only applied to options ending with '_page',
* or the 'layout_columns' option.
*
* @see set_screen_options()
*
* @param bool $keep Whether to save or skip saving the screen option value.
* Default false.
* @param string $option The option name.
* @param int $value The number of rows to use.
*/
$value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Filters a screen option value before it is set.
*
* The filter can also be used to modify non-standard [items]_per_page
* settings. See the parent function for a full list of standard options.
* The dynamic portion of the hook, `$option`, refers to the option name.
*
* Returning false to the filter will skip saving the current option.
*
* @since 2.8.0
* @since 5.4.2
*
* @see set_screen_options()
*
* @param bool $keep Whether to save or skip saving the screen option value. Default false.
* @param string $option The option name.
* @param int $value The number of rows to use.
* @param bool $keep Whether to save or skip saving the screen option value.
* Default false.
* @param string $option The option name.
* @param int $value The number of rows to use.
*/
$value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
$value = apply_filters( "set_screen_option_{$option}", false, $option, $value );
if ( false === $value ) {
return;
......
......@@ -278,6 +278,7 @@ function get_theme_feature_list( $api = true ) {
__( 'Features' ) => array(
'accessibility-ready' => __( 'Accessibility Ready' ),
'block-styles' => __( 'Block Editor Styles' ),
'custom-background' => __( 'Custom Background' ),
'custom-colors' => __( 'Custom Colors' ),
'custom-header' => __( 'Custom Header' ),
......@@ -300,6 +301,7 @@ function get_theme_feature_list( $api = true ) {
'four-columns' => __( 'Four Columns' ),
'left-sidebar' => __( 'Left Sidebar' ),
'right-sidebar' => __( 'Right Sidebar' ),
'wide-blocks' => __( 'Wide Blocks' ),
),
);
......
......@@ -405,7 +405,7 @@ if ( ! is_multisite() && current_user_can( 'edit_themes' ) && $broken_themes ) {
</tr>
<?php foreach ( $broken_themes as $broken_theme ) : ?>
<tr>
<td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?></td>
<td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?></td>
<td><?php echo $broken_theme->errors()->get_error_message(); ?></td>
<?php
if ( $can_resume ) {
......
......@@ -56,8 +56,8 @@ do_action( 'set_comment_cookies', $comment, $user, $cookies_consent );
$location = empty( $_POST['redirect_to'] ) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment->comment_ID;
// Add specific query arguments to display the awaiting moderation message.
if ( 'unapproved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_author_email ) ) {
// If user didn't consent to cookies, add specific query arguments to display the awaiting moderation message.
if ( ! $cookies_consent && 'unapproved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_author_email ) ) {
$location = add_query_arg(
array(
'unapproved' => $comment->comment_ID,
......
......@@ -74,6 +74,15 @@
margin: $size__spacing-unit 0;
width: 1em;
}
&.has-text-align-center:before {
margin-left: auto;
margin-right: auto;
}
&.has-text-align-right:before {
margin-left: auto;
}
}
/* If we add the border using a regular CSS border, it won't look good on non-retina devices,
......
.widget {
margin: 0 0 #{$size__spacing-unit};
.widget-title {
font-size: $font__size-lg;
}
/* Make sure select elements fit in widgets. */
select {
max-width: 100%;
......
......@@ -636,6 +636,15 @@ h1:before {
width: 1em;
}
h1.has-text-align-center:before {
margin-left: auto;
margin-right: auto;
}
h1.has-text-align-right:before {
margin-left: auto;
}
@media only screen and (min-width: 768px) {
h1 {
font-size: 2.8125em;
......@@ -655,6 +664,15 @@ h2:before {
width: 1em;
}
h2.has-text-align-center:before {
margin-left: auto;
margin-right: auto;
}
h2.has-text-align-right:before {
margin-left: auto;
}
@media only screen and (min-width: 768px) {
h2 {
font-size: 2.25em;
......@@ -768,6 +786,15 @@ figcaption,
width: 1em;
}
.editor-post-title__block.has-text-align-center:before {
margin-left: auto;
margin-right: auto;
}
.editor-post-title__block.has-text-align-right:before {
margin-left: auto;
}
.editor-post-title__block:before {
width: 2.8125em;
margin-top: 0;
......
......@@ -2527,6 +2527,17 @@ h2:before {
width: 1em;
}
h1:not(.site-title).has-text-align-center:before,
h2.has-text-align-center:before {
margin-right: auto;
margin-left: auto;
}
h1:not(.site-title).has-text-align-right:before,
h2.has-text-align-right:before {
margin-right: auto;
}
hr {
background-color: #767676;
border: 0;
......@@ -4209,6 +4220,15 @@ body.page .main-navigation {
width: 1em;
}
.entry .entry-title.has-text-align-center:before {
margin-right: auto;
margin-left: auto;
}
.entry .entry-title.has-text-align-right:before {
margin-right: auto;
}
.entry .entry-title a {
color: inherit;
}
......@@ -4493,6 +4513,15 @@ body.page .main-navigation {
width: 1em;
}
.author-bio .author-title.has-text-align-center:before {
margin-right: auto;
margin-left: auto;
}
.author-bio .author-title.has-text-align-right:before {
margin-right: auto;
}
.author-bio .author-description {
display: inline;
color: #767676;
......@@ -4587,6 +4616,15 @@ body.page .main-navigation {
width: 1em;
}
.comments-area .comments-title-wrap .comments-title.has-text-align-center:before {
margin-right: auto;
margin-left: auto;
}
.comments-area .comments-title-wrap .comments-title.has-text-align-right:before {
margin-right: auto;
}
@media only screen and (min-width: 768px) {
.comments-area .comments-title-wrap .comments-title {
flex: 1 0 calc(3 * (100vw / 12));
......@@ -5071,6 +5109,10 @@ body.page .main-navigation {
/* Make sure select elements fit in widgets. */
}
.widget .widget-title {
font-size: 1.6875em;
}
.widget select {
max-width: 100%;
}
......
......@@ -2527,6 +2527,17 @@ h2:before {
width: 1em;
}
h1:not(.site-title).has-text-align-center:before,
h2.has-text-align-center:before {
margin-left: auto;
margin-right: auto;
}
h1:not(.site-title).has-text-align-right:before,
h2.has-text-align-right:before {
margin-left: auto;
}
hr {
background-color: #767676;
border: 0;
......@@ -4215,6 +4226,15 @@ body.page .main-navigation {
width: 1em;
}
.entry .entry-title.has-text-align-center:before {
margin-left: auto;
margin-right: auto;
}
.entry .entry-title.has-text-align-right:before {
margin-left: auto;
}
.entry .entry-title a {
color: inherit;
}
......@@ -4499,6 +4519,15 @@ body.page .main-navigation {
width: 1em;
}
.author-bio .author-title.has-text-align-center:before {
margin-left: auto;
margin-right: auto;
}
.author-bio .author-title.has-text-align-right:before {
margin-left: auto;
}
.author-bio .author-description {
display: inline;
color: #767676;
......@@ -4593,6 +4622,15 @@ body.page .main-navigation {
width: 1em;
}
.comments-area .comments-title-wrap .comments-title.has-text-align-center:before {
margin-left: auto;
margin-right: auto;
}
.comments-area .comments-title-wrap .comments-title.has-text-align-right:before {
margin-left: auto;
}
@media only screen and (min-width: 768px) {
.comments-area .comments-title-wrap .comments-title {
flex: 1 0 calc(3 * (100vw / 12));
......@@ -5077,6 +5115,10 @@ body.page .main-navigation {
/* Make sure select elements fit in widgets. */
}
.widget .widget-title {
font-size: 1.6875em;
}
.widget select {
max-width: 100%;
}
......
{
"extends": [
"stylelint-config-wordpress"
],
"plugins": ["stylelint-a11y"],
"rules": {
"font-family-no-missing-generic-family-keyword": null,
"no-descending-specificity": null,
"a11y/no-outline-none": true,
"a11y/selector-pseudo-class-focus": true
}
}
{
"extends": [
"stylelint-config-wordpress"
],
"plugins": ["stylelint-a11y"],
"rules": {
"font-family-no-missing-generic-family-keyword": null,
"no-descending-specificity": null,
"a11y/no-outline-none": true,
"a11y/selector-pseudo-class-focus": true
}
}
<?php
/**
* The template for displaying the 404 template in the Twenty Twenty theme.
*
* @package WordPress
* @subpackage Twenty_Twenty
* @since Twenty Twenty 1.0
*/
get_header();
?>
<main id="site-content" role="main">
<div class="section-inner thin error404-content">
<h1 class="entry-title"><?php _e( 'Page Not Found', 'twentytwenty' ); ?></h1>
<div class="intro-text"><p><?php _e( 'The page you were looking for could not be found. It might have been removed, renamed, or did not exist in the first place.', 'twentytwenty' ); ?></p></div>
<?php
get_search_form(
array(
'label' => __( '404 not found', 'twentytwenty' ),
)
);
?>
</div><!-- .section-inner -->
</main><!-- #site-content -->
<?php get_template_part( 'template-parts/footer-menus-widgets' ); ?>
<?php
get_footer();
<?php
/**
* The template for displaying the 404 template in the Twenty Twenty theme.
*
* @package WordPress
* @subpackage Twenty_Twenty
* @since Twenty Twenty 1.0
*/
get_header();
?>
<main id="site-content" role="main">
<div class="section-inner thin error404-content">
<h1 class="entry-title"><?php _e( 'Page Not Found', 'twentytwenty' ); ?></h1>
<div class="intro-text"><p><?php _e( 'The page you were looking for could not be found. It might have been removed, renamed, or did not exist in the first place.', 'twentytwenty' ); ?></p></div>
<?php
get_search_form(
array(
'label' => __( '404 not found', 'twentytwenty' ),
)
);
?>
</div><!-- .section-inner -->
</main><!-- #site-content -->
<?php get_template_part( 'template-parts/footer-menus-widgets' ); ?>
<?php
get_footer();
/* global Color */
/* eslint no-unused-vars: off */
/**
* Color Calculations.
*
* @since Twenty Twenty 1.0
*
* @param {string} backgroundColor - The background color.
* @param {number} accentHue - The hue for our accent color.
*
* @return {Object} - this
*/
function _twentyTwentyColor( backgroundColor, accentHue ) {
// Set the object properties.
this.backgroundColor = backgroundColor;
this.accentHue = accentHue;
this.bgColorObj = new Color( backgroundColor );
this.textColorObj = this.bgColorObj.getMaxContrastColor();
this.textColor = this.textColorObj.toCSS();
this.isDark = 0.5 > this.bgColorObj.toLuminosity();
this.isLight = ! this.isDark;
// Return the object.
return this;
}
/**
* Builds an array of Color objects based on the accent hue.
* For improved performance we only build half the array
* depending on dark/light background-color.
*
* @since Twenty Twenty 1.0
*
* @return {Object} - this
*/
_twentyTwentyColor.prototype.setAccentColorsArray = function() {
var self = this,
minSaturation = 65,
maxSaturation = 100,
minLightness = 30,
maxLightness = 80,
stepSaturation = 2,
stepLightness = 2,
pushColor = function() {
var colorObj = new Color( {
h: self.accentHue,
s: s,
l: l
} ),
item,
/**
* Get a score for this color in contrast to its background color and surrounding text.
*
* @since Twenty Twenty 1.0
*
* @param {number} contrastBackground - WCAG contrast with the background color.
* @param {number} contrastSurroundingText - WCAG contrast with surrounding text.
* @return {number} - 0 is best, higher numbers have bigger difference with the desired scores.
*/
getScore = function( contrastBackground, contrastSurroundingText ) {
var diffBackground = ( 7 >= contrastBackground ) ? 0 : 7 - contrastBackground,
diffSurroundingText = ( 3 >= contrastSurroundingText ) ? 0 : 3 - contrastSurroundingText;
return diffBackground + diffSurroundingText;
};
item = {
color: colorObj,
contrastBackground: colorObj.getDistanceLuminosityFrom( self.bgColorObj ),
contrastText: colorObj.getDistanceLuminosityFrom( self.textColorObj )
};
// Check a minimum