Merged in feature/81-dev-dev01 (pull request #5)
auto-patch 81-dev-dev01-2023-12-05T22_45_26 * auto-patch 81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
@@ -191,7 +191,6 @@ function list_core_update( $update ) {
|
||||
}
|
||||
|
||||
echo '</form>';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -242,13 +241,8 @@ function dismissed_updates() {
|
||||
* Display upgrade WordPress for downloading latest or upgrading automatically form.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @global string $required_php_version The required PHP version string.
|
||||
* @global string $required_mysql_version The required MySQL version string.
|
||||
*/
|
||||
function core_upgrade_preamble() {
|
||||
global $required_php_version, $required_mysql_version;
|
||||
|
||||
$updates = get_core_updates();
|
||||
|
||||
// Include an unmodified $wp_version.
|
||||
@@ -261,14 +255,19 @@ function core_upgrade_preamble() {
|
||||
_e( 'An updated version of WordPress is available.' );
|
||||
echo '</h2>';
|
||||
|
||||
echo '<div class="notice notice-warning inline"><p>';
|
||||
printf(
|
||||
$message = sprintf(
|
||||
/* translators: 1: Documentation on WordPress backups, 2: Documentation on updating WordPress. */
|
||||
__( '<strong>Important:</strong> Before updating, please <a href="%1$s">back up your database and files</a>. For help with updates, visit the <a href="%2$s">Updating WordPress</a> documentation page.' ),
|
||||
__( 'https://wordpress.org/documentation/article/wordpress-backups/' ),
|
||||
__( 'https://wordpress.org/documentation/article/updating-wordpress/' )
|
||||
);
|
||||
echo '</p></div>';
|
||||
wp_admin_notice(
|
||||
$message,
|
||||
array(
|
||||
'type' => 'warning',
|
||||
'additional_classes' => array( 'inline' ),
|
||||
)
|
||||
);
|
||||
} elseif ( $is_development_version ) {
|
||||
echo '<h2 class="response">' . __( 'You are using a development version of WordPress.' ) . '</h2>';
|
||||
} else {
|
||||
@@ -308,10 +307,22 @@ function core_auto_updates_settings() {
|
||||
if ( isset( $_GET['core-major-auto-updates-saved'] ) ) {
|
||||
if ( 'enabled' === $_GET['core-major-auto-updates-saved'] ) {
|
||||
$notice_text = __( 'Automatic updates for all WordPress versions have been enabled. Thank you!' );
|
||||
echo '<div class="notice notice-success is-dismissible"><p>' . $notice_text . '</p></div>';
|
||||
wp_admin_notice(
|
||||
$notice_text,
|
||||
array(
|
||||
'type' => 'success',
|
||||
'dismissible' => true,
|
||||
)
|
||||
);
|
||||
} elseif ( 'disabled' === $_GET['core-major-auto-updates-saved'] ) {
|
||||
$notice_text = __( 'WordPress will only receive automatic security and maintenance releases from now on.' );
|
||||
echo '<div class="notice notice-success is-dismissible"><p>' . $notice_text . '</p></div>';
|
||||
wp_admin_notice(
|
||||
$notice_text,
|
||||
array(
|
||||
'type' => 'success',
|
||||
'dismissible' => true,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -571,7 +582,8 @@ function list_plugin_updates() {
|
||||
<tr>
|
||||
<td class="check-column">
|
||||
<?php if ( $compatible_php ) : ?>
|
||||
<label for="<?php echo $checkbox_id; ?>" class="label-covers-full-cell">
|
||||
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
|
||||
<label for="<?php echo $checkbox_id; ?>">
|
||||
<span class="screen-reader-text">
|
||||
<?php
|
||||
/* translators: Hidden accessibility text. %s: Plugin name. */
|
||||
@@ -579,7 +591,6 @@ function list_plugin_updates() {
|
||||
?>
|
||||
</span>
|
||||
</label>
|
||||
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="plugin-title"><p>
|
||||
@@ -749,7 +760,8 @@ function list_theme_updates() {
|
||||
<tr>
|
||||
<td class="check-column">
|
||||
<?php if ( $compatible_wp && $compatible_php ) : ?>
|
||||
<label for="<?php echo $checkbox_id; ?>" class="label-covers-full-cell">
|
||||
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
|
||||
<label for="<?php echo $checkbox_id; ?>">
|
||||
<span class="screen-reader-text">
|
||||
<?php
|
||||
/* translators: Hidden accessibility text. %s: Theme name. */
|
||||
@@ -757,7 +769,6 @@ function list_theme_updates() {
|
||||
?>
|
||||
</span>
|
||||
</label>
|
||||
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="plugin-title"><p>
|
||||
@@ -1061,16 +1072,22 @@ if ( 'upgrade-core' === $action ) {
|
||||
if ( 'themes' === $upgrade_error ) {
|
||||
$theme_updates = get_theme_updates();
|
||||
if ( ! empty( $theme_updates ) ) {
|
||||
echo '<div class="error"><p>';
|
||||
_e( 'Please select one or more themes to update.' );
|
||||
echo '</p></div>';
|
||||
wp_admin_notice(
|
||||
__( 'Please select one or more themes to update.' ),
|
||||
array(
|
||||
'additional_classes' => array( 'error' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$plugin_updates = get_plugin_updates();
|
||||
if ( ! empty( $plugin_updates ) ) {
|
||||
echo '<div class="error"><p>';
|
||||
_e( 'Please select one or more plugins to update.' );
|
||||
echo '</p></div>';
|
||||
wp_admin_notice(
|
||||
__( 'Please select one or more plugins to update.' ),
|
||||
array(
|
||||
'additional_classes' => array( 'error' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user