Install/Upgrade: Link to HelpHub instead of the Codex.
WordPress version links in the Codex (eg, https://codex.wordpress.org/Version_5.0) are redirected to their HelpHub equivalent. Rather than relying on the redirect, Core and link directly to HelpHub. Props swissspidy. Fixes #45574. Built from https://develop.svn.wordpress.org/trunk@44451 git-svn-id: http://core.svn.wordpress.org/trunk@44282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
308a544039
commit
7f67e235a7
|
@ -262,28 +262,26 @@ function update_nag() {
|
||||||
return false;
|
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' ) ) {
|
if ( current_user_can( 'update_core' ) ) {
|
||||||
$msg = sprintf(
|
$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 */
|
||||||
__( '<a href="%1$s">WordPress %2$s</a> is available! <a href="%3$s" aria-label="%4$s">Please update now</a>.' ),
|
__( '<a href="%1$s">WordPress %2$s</a> is available! <a href="%3$s" aria-label="%4$s">Please update now</a>.' ),
|
||||||
sprintf(
|
$version_url,
|
||||||
/* translators: %s: WordPress version */
|
|
||||||
esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ),
|
|
||||||
$cur->current
|
|
||||||
),
|
|
||||||
$cur->current,
|
$cur->current,
|
||||||
network_admin_url( 'update-core.php' ),
|
network_admin_url( 'update-core.php' ),
|
||||||
esc_attr__( 'Please update WordPress now' )
|
esc_attr__( 'Please update WordPress now' )
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$msg = sprintf(
|
$msg = sprintf(
|
||||||
/* translators: 1: Codex URL to release notes, 2: new WordPress version */
|
/* translators: 1: URL to WordPress release notes, 2: new WordPress version */
|
||||||
__( '<a href="%1$s">WordPress %2$s</a> is available! Please notify the site administrator.' ),
|
__( '<a href="%1$s">WordPress %2$s</a> is available! Please notify the site administrator.' ),
|
||||||
sprintf(
|
$version_url,
|
||||||
/* translators: %s: WordPress version */
|
|
||||||
esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ),
|
|
||||||
$cur->current
|
|
||||||
),
|
|
||||||
$cur->current
|
$cur->current
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,15 +238,21 @@ $mysql_version = $wpdb->db_version();
|
||||||
$php_compat = version_compare( $php_version, $required_php_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' );
|
$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 ) {
|
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 */
|
/* 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 <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> 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 );
|
$compat = sprintf( __( 'You cannot install because <a href="%1$s">WordPress %2$s</a> 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 ) {
|
} elseif ( ! $php_compat ) {
|
||||||
/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
|
/* 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 <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );
|
$compat = sprintf( __( 'You cannot install because <a href="%1$s">WordPress %2$s</a> 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 ) {
|
} elseif ( ! $mysql_compat ) {
|
||||||
/* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
|
/* 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 <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );
|
$compat = sprintf( __( 'You cannot install because <a href="%1$s">WordPress %2$s</a> 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 ) {
|
if ( ! $mysql_compat || ! $php_compat ) {
|
||||||
|
|
|
@ -70,17 +70,24 @@ function list_core_update( $update ) {
|
||||||
$mysql_compat = version_compare( $mysql_version, $update->mysql_version, '>=' );
|
$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 ) {
|
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 */
|
/* 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 <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> 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 );
|
$message = sprintf( __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> 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 ) {
|
} elseif ( ! $php_compat ) {
|
||||||
/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
|
/* 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 <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $update->current, $update->php_version, $php_version );
|
$message = sprintf( __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> 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 ) {
|
} elseif ( ! $mysql_compat ) {
|
||||||
/* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
|
/* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
|
||||||
$message = sprintf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $update->current, $update->mysql_version, $mysql_version );
|
$message = sprintf( __( 'You cannot update because <a href="%1$s">WordPress %2$s</a> 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: WordPress version number, 2: WordPress version number including locale if necessary */
|
} else {
|
||||||
$message = sprintf( __( 'You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically:' ), $update->current, $version_string );
|
/* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary */
|
||||||
|
$message = sprintf( __( 'You can update to <a href="%1$s">WordPress %2$s</a> automatically:' ), $version_url, $version_string );
|
||||||
}
|
}
|
||||||
if ( ! $mysql_compat || ! $php_compat ) {
|
if ( ! $mysql_compat || ! $php_compat ) {
|
||||||
$show_buttons = false;
|
$show_buttons = false;
|
||||||
|
|
|
@ -80,12 +80,21 @@ if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
elseif ( ! $php_compat || ! $mysql_compat ) :
|
elseif ( ! $php_compat || ! $mysql_compat ) :
|
||||||
|
$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 ) {
|
if ( ! $mysql_compat && ! $php_compat ) {
|
||||||
printf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> 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 <a href="%1$s">WordPress %2$s</a> 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 ) {
|
} elseif ( ! $php_compat ) {
|
||||||
printf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> 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 <a href="%1$s">WordPress %2$s</a> 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 ) {
|
} elseif ( ! $mysql_compat ) {
|
||||||
printf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> 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 <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.' ), $version_url, $wp_version, $required_mysql_version, $mysql_version );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.1-alpha-44450';
|
$wp_version = '5.1-alpha-44451';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue