--- a/wp/wp-admin/update-core.php Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/update-core.php Tue Sep 27 16:37:53 2022 +0200
@@ -48,6 +48,8 @@
// If the only available update is a partial builds, it doesn't need a language-specific version string.
$version_string = $update->current;
}
+ } elseif ( 'en_US' === $update->locale && 'en_US' !== get_locale() ) {
+ $version_string = sprintf( '%s–%s', $update->current, $update->locale );
}
$current = false;
@@ -154,7 +156,7 @@
echo $message;
echo '</p>';
- echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
+ echo '<form method="post" action="' . esc_url( $form_action ) . '" name="upgrade" class="upgrade">';
wp_nonce_field( 'upgrade-core' );
echo '<p>';
@@ -204,18 +206,26 @@
'available' => false,
)
);
+
if ( $dismissed ) {
-
$show_text = esc_js( __( 'Show hidden updates' ) );
$hide_text = esc_js( __( 'Hide hidden updates' ) );
?>
- <script type="text/javascript">
- jQuery(function( $ ) {
- $( 'dismissed-updates' ).show();
- $( '#show-dismissed' ).toggle( function() { $( this ).text( '<?php echo $hide_text; ?>' ).attr( 'aria-expanded', 'true' ); }, function() { $( this ).text( '<?php echo $show_text; ?>' ).attr( 'aria-expanded', 'false' ); } );
- $( '#show-dismissed' ).click( function() { $( '#dismissed-updates' ).toggle( 'fast' ); } );
- });
- </script>
+ <script type="text/javascript">
+ jQuery( function( $ ) {
+ $( '#show-dismissed' ).on( 'click', function() {
+ var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
+
+ if ( isExpanded ) {
+ $( this ).text( '<?php echo $show_text; ?>' ).attr( 'aria-expanded', 'false' );
+ } else {
+ $( this ).text( '<?php echo $hide_text; ?>' ).attr( 'aria-expanded', 'true' );
+ }
+
+ $( '#dismissed-updates' ).toggle( 'fast' );
+ });
+ });
+ </script>
<?php
echo '<p class="hide-if-no-js"><button type="button" class="button" id="show-dismissed" aria-expanded="false">' . __( 'Show hidden updates' ) . '</button></p>';
echo '<ul id="dismissed-updates" class="core-updates dismissed">';
@@ -525,7 +535,7 @@
$compatible_php = is_php_version_compatible( $requires_php );
if ( ! $compatible_php && current_user_can( 'update_php' ) ) {
- $compat .= '<br>' . __( 'This update doesn’t work with your version of PHP.' ) . ' ';
+ $compat .= '<br>' . __( 'This update does not work with your version of PHP.' ) . ' ';
$compat .= sprintf(
/* translators: %s: URL to Update PHP page. */
__( '<a href="%s">Learn more about updating PHP</a>.' ),
@@ -671,7 +681,7 @@
$compat = '';
if ( ! $compatible_wp && ! $compatible_php ) {
- $compat .= '<br>' . __( 'This update doesn’t work with your versions of WordPress and PHP.' ) . ' ';
+ $compat .= '<br>' . __( 'This update does not work with your versions of WordPress and PHP.' ) . ' ';
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
$compat .= sprintf(
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
@@ -705,7 +715,7 @@
}
}
} elseif ( ! $compatible_wp ) {
- $compat .= '<br>' . __( 'This update doesn’t work with your version of WordPress.' ) . ' ';
+ $compat .= '<br>' . __( 'This update does not work with your version of WordPress.' ) . ' ';
if ( current_user_can( 'update_core' ) ) {
$compat .= sprintf(
/* translators: %s: URL to WordPress Updates screen. */
@@ -714,7 +724,7 @@
);
}
} elseif ( ! $compatible_php ) {
- $compat .= '<br>' . __( 'This update doesn’t work with your version of PHP.' ) . ' ';
+ $compat .= '<br>' . __( 'This update does not work with your version of PHP.' ) . ' ';
if ( current_user_can( 'update_php' ) ) {
$compat .= sprintf(
/* translators: %s: URL to Update PHP page. */
@@ -745,7 +755,7 @@
<?php endif; ?>
</td>
<td class="plugin-title"><p>
- <img src="<?php echo esc_url( $theme->get_screenshot() ); ?>" width="85" height="64" class="updates-table-screenshot" alt="" />
+ <img src="<?php echo esc_url( $theme->get_screenshot() . '?ver=' . $theme->version ); ?>" width="85" height="64" class="updates-table-screenshot" alt="" />
<strong><?php echo $theme->display( 'Name' ); ?></strong>
<?php
printf(
@@ -1044,7 +1054,7 @@
echo '<p class="update-last-checked">';
/* translators: 1: Date, 2: Time. */
- printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ), $last_update_check ), date_i18n( __( 'g:i a' ), $last_update_check ) );
+ printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ), $last_update_check ), date_i18n( __( 'g:i a T' ), $last_update_check ) );
echo ' <a href="' . esc_url( self_admin_url( 'update-core.php?force-check=1' ) ) . '">' . __( 'Check again.' ) . '</a>';
echo '</p>';
@@ -1136,6 +1146,7 @@
$url = 'update.php?action=update-selected&plugins=' . urlencode( implode( ',', $plugins ) );
$url = wp_nonce_url( $url, 'bulk-update-plugins' );
+ // Used in the HTML title tag.
$title = __( 'Update Plugins' );
require_once ABSPATH . 'wp-admin/admin-header.php';
@@ -1176,6 +1187,7 @@
$url = 'update.php?action=update-selected-themes&themes=' . urlencode( implode( ',', $themes ) );
$url = wp_nonce_url( $url, 'bulk-update-themes' );
+ // Used in the HTML title tag.
$title = __( 'Update Themes' );
require_once ABSPATH . 'wp-admin/admin-header.php';