Skip to content

Commit

Permalink
Update to WordPress 5.6.1. For more information, see https://wordpres…
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantheon Automation authored and greg-1-anderson committed Feb 3, 2021
1 parent 44d39ff commit 241cd26
Show file tree
Hide file tree
Showing 268 changed files with 791 additions and 580 deletions.
33 changes: 33 additions & 0 deletions wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,39 @@
</p>
</div>

<div class="about__section changelog">
<div class="column has-border has-subtle-background-color">
<h2 class="is-smaller-heading"><?php _e( 'Maintenance Release' ); ?></h2>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: Plural number of bugs. */
_n(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.',
27
),
'5.6.1',
number_format_i18n( 27 )
);
?>
<?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.6.1' )
)
);
?>
</p>
</div>
</div>

<hr />

<div class="has-background-image" style="background-image: url('data:image/svg+xml,<?php echo rawurlencode( '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 1035 884"><circle cx="503" cy="434" r="310" fill="#E3DAD1"/><circle cx="831" cy="204" r="204" fill="#D1CFE4"/><circle cx="113.5" cy="770.5" r="113.5" fill="#D1DEE4"/></svg>' ); ?>');">
<div class="about__section has-2-columns is-wider-left has-transparent-background-color">
<div class="column">
Expand Down
12 changes: 8 additions & 4 deletions wp-admin/authorize-application.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
);
}

if ( ! empty( $_SERVER['PHP_AUTH_USER'] ) || ! empty( $_SERVER['PHP_AUTH_PW'] ) ) {
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.' ),
__( 'Cannot Authorize Application' ),
Expand Down Expand Up @@ -141,7 +141,7 @@
<?php endif; ?>

<div class="card auth-app-card">
<h2 class="title"><?php __( 'An application would like to connect to your account.' ); ?></h2>
<h2 class="title"><?php _e( 'An application would like to connect to your account.' ); ?></h2>
<?php if ( $app_name ) : ?>
<p>
<?php
Expand Down Expand Up @@ -200,15 +200,19 @@

<?php
/**
* Fires in the Authorize Application Password new password section.
* Fires in the Authorize Application Password new password section in the no-JS version.
*
* In most cases, this should be used in combination with the {@see 'wp_application_passwords_approve_app_request_success'}
* action to ensure that both the JS and no-JS variants are handled.
*
* @since 5.6.0
* @since 5.6.1 Corrected action name and signature.
*
* @param string $new_password The newly generated application password.
* @param array $request The array of request data. All arguments are optional and may be empty.
* @param WP_User $user The user authorizing the application.
*/
do_action( 'wp_authorize_application_password_form', $request, $user );
do_action( 'wp_authorize_application_password_form_approved_no_js', $new_password, $request, $user );
?>
<?php else : ?>
<form action="<?php echo esc_url( admin_url( 'authorize-application.php' ) ); ?>" method="post" class="form-wrap">
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/common-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ div.star-holder .star-rating {
}

.rtl .star-rating .star-half {
transform: rotateY(180deg);
transform: rotateY(-180deg);
}

.star-rating .star-empty:before {
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/common-rtl.min.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion wp-admin/css/forms-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ table.form-table td .updated p {
.create-application-password p.submit {
margin-bottom: 0;
padding-bottom: 0;
display: block;
}

#application-passwords-section .notice {
Expand All @@ -879,7 +880,7 @@ table.form-table td .updated p {
}

.authorize-application-php .form-wrap p {
display: block !important;
display: block;
}

/*------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/forms-rtl.min.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion wp-admin/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ table.form-table td .updated p {
.create-application-password p.submit {
margin-bottom: 0;
padding-bottom: 0;
display: block;
}

#application-passwords-section .notice {
Expand All @@ -878,7 +879,7 @@ table.form-table td .updated p {
}

.authorize-application-php .form-wrap p {
display: block !important;
display: block;
}

/*------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/forms.min.css

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion wp-admin/includes/class-wp-site-health-auto-updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ public function test_constants( $constant, $value ) {
* @return array The test results.
*/
public function test_wp_version_check_attached() {
if ( ! has_filter( 'wp_version_check', 'wp_version_check' ) ) {
if ( ( ! is_multisite() || is_main_site() && is_network_admin() )
&& ! has_filter( 'wp_version_check', 'wp_version_check' )
) {
return array(
'description' => sprintf(
/* translators: %s: Name of the filter used. */
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/includes/class-wp-site-health.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ public function get_test_php_version() {
'<p>%s</p>',
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.' ),
__( 'PHP is the programming language used to build and maintain WordPress. Newer versions of PHP are created with increased performance in mind, so you may see a positive effect on your site&#8217;s performance. The minimum recommended version of PHP is %s.' ),
$response ? $response['recommended_version'] : ''
)
),
Expand Down Expand Up @@ -2531,7 +2531,7 @@ function can_perform_loopback() {
$headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) );
}

$url = admin_url();
$url = site_url();

$r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );

Expand Down
25 changes: 20 additions & 5 deletions wp-admin/includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function wp_dashboard_setup() {
$response = wp_check_php_version();
if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'update_php' ) ) {
add_filter( 'postbox_classes_dashboard_dashboard_php_nag', 'dashboard_php_nag_class' );
wp_add_dashboard_widget( 'dashboard_php_nag', __( 'PHP Update Required' ), 'wp_dashboard_php_nag' );
wp_add_dashboard_widget( 'dashboard_php_nag', __( 'PHP Update Recommended' ), 'wp_dashboard_php_nag' );
}

// Site Health.
Expand Down Expand Up @@ -1747,16 +1747,31 @@ function wp_dashboard_php_nag() {
}

if ( isset( $response['is_secure'] ) && ! $response['is_secure'] ) {
$msg = __( 'WordPress has detected that your site is running on an insecure version of PHP.' );
$msg = sprintf(
/* translators: %s: The server PHP version. */
__( 'Your site is running an insecure version of PHP (%s), which should be updated.' ),
PHP_VERSION
);
} else {
$msg = __( 'WordPress has detected that your site is running on an outdated version of PHP.' );
$msg = sprintf(
/* translators: %s: The server PHP version. */
__( 'Your site is running an outdated version of PHP (%s), which should be updated.' ),
PHP_VERSION
);
}

?>
<p><?php echo $msg; ?></p>

<h3><?php _e( 'What is PHP and how does it affect my site?' ); ?></h3>
<p><?php _e( 'PHP is the programming language we use to build and maintain WordPress. Newer versions of PHP are both faster and more secure, so updating will have a positive effect on your site&#8217;s performance.' ); ?></p>
<p>
<?php
printf(
/* translators: %s: The minimum recommended PHP version. */
__( 'PHP is the programming language used to build and maintain WordPress. Newer versions of PHP are created with increased performance in mind, so you may see a positive effect on your site&#8217;s performance. The minimum recommended version of PHP is %s.' ),
$response ? $response['recommended_version'] : ''
);
?>
</p>

<p class="button-container">
<?php
Expand Down
3 changes: 2 additions & 1 deletion wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -3288,10 +3288,11 @@ function attachment_submitbox_metadata() {

$att_url = wp_get_attachment_url( $attachment_id );

$author = get_userdata( $post->post_author );
$author = new WP_User( $post->post_author );

$uploaded_by_name = __( '(no author)' );
$uploaded_by_link = '';

if ( $author->exists() ) {
$uploaded_by_name = $author->display_name ? $author->display_name : $author->nickname;
$uploaded_by_link = get_edit_user_link( $author->ID );
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/includes/privacy-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,13 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
}

// Protect export folder from browsing.
$index_pathname = $exports_dir . 'index.html';
$index_pathname = $exports_dir . 'index.php';
if ( ! file_exists( $index_pathname ) ) {
$file = fopen( $index_pathname, 'w' );
if ( false === $file ) {
wp_send_json_error( __( 'Unable to protect user privacy export folder from browsing.' ) );
}
fwrite( $file, '<!-- Silence is golden. -->' );
fwrite( $file, "<?php\n// Silence is golden.\n" );
fclose( $file );
}

Expand Down
2 changes: 1 addition & 1 deletion wp-admin/js/accordion.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wp-admin/js/application-passwords.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion wp-admin/js/auth-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
/**
* Fires when an Authorize Application Password request has been successfully approved.
*
* In most cases, this should be used in combination with the {@see 'wp_authorize_application_password_form_approved_no_js'}
* action to ensure that both the JS and no-JS variants are handled.
*
* @since 5.6.0
*
* @param {Object} response The response from the REST API.
Expand Down Expand Up @@ -126,13 +129,14 @@
* Fires when an Authorize Application Password request encountered an error when trying to approve the request.
*
* @since 5.6.0
* @since 5.6.1 Corrected action name and signature.
*
* @param {Object|null} error The error from the REST API. May be null if the server did not send proper JSON.
* @param {string} textStatus The status of the request.
* @param {string} errorThrown The error message associated with the response status code.
* @param {jqXHR} jqXHR The underlying jqXHR object that made the request.
*/
wp.hooks.doAction( 'wp_application_passwords_approve_app_request_success', error, textStatus, jqXHR );
wp.hooks.doAction( 'wp_application_passwords_approve_app_request_error', error, textStatus, errorThrown, jqXHR );
} );
} );

Expand Down
Loading

0 comments on commit 241cd26

Please sign in to comment.