rebase code on oct-10-2023
This commit is contained in:
@@ -42,37 +42,6 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
<a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
|
||||
<a href="contribute.php" class="nav-tab"><?php _e( 'Get Involved' ); ?></a>
|
||||
</nav>
|
||||
|
||||
<div class="about__section changelog has-subtle-background-color">
|
||||
<div class="column">
|
||||
<h2><?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.',
|
||||
10
|
||||
),
|
||||
'6.3.1',
|
||||
'10'
|
||||
);
|
||||
?>
|
||||
<?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( '6.3.1' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="about__section aligncenter">
|
||||
<div class="column">
|
||||
|
||||
@@ -1943,6 +1943,10 @@ class WP_Site_Health {
|
||||
public function get_test_available_updates_disk_space() {
|
||||
$available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( WP_CONTENT_DIR . '/upgrade/' ) : false;
|
||||
|
||||
$available_space = false !== $available_space
|
||||
? (int) $available_space
|
||||
: 0;
|
||||
|
||||
$result = array(
|
||||
'label' => __( 'Disk space available to safely perform updates' ),
|
||||
'status' => 'good',
|
||||
@@ -1959,14 +1963,18 @@ class WP_Site_Health {
|
||||
'test' => 'available_updates_disk_space',
|
||||
);
|
||||
|
||||
if ( false === $available_space ) {
|
||||
$result['description'] = __( 'Could not determine available disk space for updates.' );
|
||||
if ( $available_space < 100 * MB_IN_BYTES ) {
|
||||
$result['description'] = __( 'Available disk space is low, less than 100 MB available.' );
|
||||
$result['status'] = 'recommended';
|
||||
} elseif ( $available_space < 20 * MB_IN_BYTES ) {
|
||||
}
|
||||
|
||||
if ( $available_space < 20 * MB_IN_BYTES ) {
|
||||
$result['description'] = __( 'Available disk space is critically low, less than 20 MB available. Proceed with caution, updates may fail.' );
|
||||
$result['status'] = 'critical';
|
||||
} elseif ( $available_space < 100 * MB_IN_BYTES ) {
|
||||
$result['description'] = __( 'Available disk space is low, less than 100 MB available.' );
|
||||
}
|
||||
|
||||
if ( ! $available_space ) {
|
||||
$result['description'] = __( 'Could not determine available disk space for updates.' );
|
||||
$result['status'] = 'recommended';
|
||||
}
|
||||
|
||||
|
||||
@@ -1431,13 +1431,9 @@ function update_core( $from, $to ) {
|
||||
} else {
|
||||
$lang_dir = WP_CONTENT_DIR . '/languages';
|
||||
}
|
||||
/*
|
||||
* Note: str_starts_with() is not used here, as this file is included
|
||||
* when updating from older WordPress versions, in which case
|
||||
* the polyfills from wp-includes/compat.php may not be available.
|
||||
*/
|
||||
|
||||
// Check if the language directory exists first.
|
||||
if ( ! @is_dir( $lang_dir ) && 0 === strpos( $lang_dir, ABSPATH ) ) {
|
||||
if ( ! @is_dir( $lang_dir ) && str_starts_with( $lang_dir, ABSPATH ) ) {
|
||||
// If it's within the ABSPATH we can handle it here, otherwise they're out of luck.
|
||||
$wp_filesystem->mkdir( $to . str_replace( ABSPATH, '', $lang_dir ), FS_CHMOD_DIR );
|
||||
clearstatcache(); // For FTP, need to clear the stat cache.
|
||||
|
||||
Reference in New Issue
Block a user