diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php
index 171aa84c52..43db04b523 100644
--- a/src/wp-admin/includes/update.php
+++ b/src/wp-admin/includes/update.php
@@ -262,28 +262,26 @@ function update_nag() {
return false;
}
+ $version_url = sprintf(
+ /* translators: %s: WordPress version */
+ esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
+ sanitize_title( $cur->current )
+ );
+
if ( current_user_can( 'update_core' ) ) {
$msg = sprintf(
- /* translators: 1: Codex URL to release notes, 2: new WordPress version, 3: URL to network admin, 4: accessibility text */
+ /* translators: 1: URL to WordPress release notes, 2: new WordPress version, 3: URL to network admin, 4: accessibility text */
__( 'WordPress %2$s is available! Please update now.' ),
- sprintf(
- /* translators: %s: WordPress version */
- esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ),
- $cur->current
- ),
+ $version_url,
$cur->current,
network_admin_url( 'update-core.php' ),
esc_attr__( 'Please update WordPress now' )
);
} else {
$msg = sprintf(
- /* translators: 1: Codex URL to release notes, 2: new WordPress version */
+ /* translators: 1: URL to WordPress release notes, 2: new WordPress version */
__( 'WordPress %2$s is available! Please notify the site administrator.' ),
- sprintf(
- /* translators: %s: WordPress version */
- esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ),
- $cur->current
- ),
+ $version_url,
$cur->current
);
}
diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php
index ce5849204f..8393b9260d 100644
--- a/src/wp-admin/install.php
+++ b/src/wp-admin/install.php
@@ -238,15 +238,21 @@ $mysql_version = $wpdb->db_version();
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
+$version_url = sprintf(
+ /* translators: %s: WordPress version */
+ esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
+ sanitize_title( $wp_version )
+);
+
if ( ! $mysql_compat && ! $php_compat ) {
- /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
- $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
+ /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number */
+ $compat = sprintf( __( 'You cannot install because WordPress %2$s requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.' ), $version_url, $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
} elseif ( ! $php_compat ) {
- /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
- $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );
+ /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number */
+ $compat = sprintf( __( 'You cannot install because WordPress %2$s requires PHP version %3$s or higher. You are running version %4$s.' ), $version_url, $wp_version, $required_php_version, $php_version );
} elseif ( ! $mysql_compat ) {
- /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
- $compat = sprintf( __( 'You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );
+ /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number */
+ $compat = sprintf( __( 'You cannot install because WordPress %2$s requires MySQL version %3$s or higher. You are running version %4$s.' ), $version_url, $wp_version, $required_mysql_version, $mysql_version );
}
if ( ! $mysql_compat || ! $php_compat ) {
diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php
index abc4f8418f..965d49199f 100644
--- a/src/wp-admin/update-core.php
+++ b/src/wp-admin/update-core.php
@@ -70,17 +70,24 @@ function list_core_update( $update ) {
$mysql_compat = version_compare( $mysql_version, $update->mysql_version, '>=' );
}
+ $version_url = sprintf(
+ /* translators: %s: WordPress version */
+ esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
+ sanitize_title( $update->current )
+ );
+
if ( ! $mysql_compat && ! $php_compat ) {
- /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
- $message = sprintf( __( 'You cannot update because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
+ /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number */
+ $message = sprintf( __( 'You cannot update because WordPress %2$s requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.' ), $version_url, $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
} elseif ( ! $php_compat ) {
- /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
- $message = sprintf( __( 'You cannot update because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $update->current, $update->php_version, $php_version );
+ /* translators: 1: URL to WordPress release notes, 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
+ $message = sprintf( __( 'You cannot update because WordPress %2$s requires PHP version %3$s or higher. You are running version %4$s.' ), $version_url, $update->current, $update->php_version, $php_version );
} elseif ( ! $mysql_compat ) {
/* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
- $message = sprintf( __( 'You cannot update because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $update->current, $update->mysql_version, $mysql_version );
- } else { /* translators: 1: WordPress version number, 2: WordPress version number including locale if necessary */
- $message = sprintf( __( 'You can update to WordPress %2$s automatically:' ), $update->current, $version_string );
+ $message = sprintf( __( 'You cannot update because WordPress %2$s requires MySQL version %3$s or higher. You are running version %4$s.' ), $version_url, $update->current, $update->mysql_version, $mysql_version );
+ } else {
+ /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary */
+ $message = sprintf( __( 'You can update to WordPress %2$s automatically:' ), $version_url, $version_string );
}
if ( ! $mysql_compat || ! $php_compat ) {
$show_buttons = false;
diff --git a/src/wp-admin/upgrade.php b/src/wp-admin/upgrade.php
index 9d701781c4..743b89e740 100644
--- a/src/wp-admin/upgrade.php
+++ b/src/wp-admin/upgrade.php
@@ -80,12 +80,21 @@ if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
+ /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number */
+ $message = sprintf( __( 'You cannot update because WordPress %2$s requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.' ), $version_url, $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
} elseif ( ! $php_compat ) {
- printf( __( 'You cannot update because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );
+ /* translators: 1: URL to WordPress release notes, 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
+ $message = sprintf( __( 'You cannot update because WordPress %2$s requires PHP version %3$s or higher. You are running version %4$s.' ), $version_url, $wp_version, $required_php_version, $php_version );
} elseif ( ! $mysql_compat ) {
- printf( __( 'You cannot update because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );
+ /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
+ $message = sprintf( __( 'You cannot update because WordPress %2$s requires MySQL version %3$s or higher. You are running version %4$s.' ), $version_url, $wp_version, $required_mysql_version, $mysql_version );
}
?>