WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/08/2019 03:28:15 AM (3 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r43571 r44451  
    7171            }
    7272
     73            $version_url = sprintf(
     74                /* translators: %s: WordPress version */
     75                esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
     76                sanitize_title( $update->current )
     77            );
     78
    7379            if ( ! $mysql_compat && ! $php_compat ) {
    74                 /* 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 */
    75                 $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 );
     80                /* 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 */
     81                $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 );
    7682            } elseif ( ! $php_compat ) {
    77                 /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
    78                 $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 );
     83                /* translators: 1: URL to WordPress release notes, 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
     84                $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 );
    7985            } elseif ( ! $mysql_compat ) {
    8086                /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
    81                 $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 );
    82             } else {              /* translators: 1: WordPress version number, 2: WordPress version number including locale if necessary */
    83                 $message = sprintf( __( 'You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically:' ), $update->current, $version_string );
     87                $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 );
     88            } else {
     89                /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary */
     90                $message = sprintf( __( 'You can update to <a href="%1$s">WordPress %2$s</a> automatically:' ), $version_url, $version_string );
    8491            }
    8592            if ( ! $mysql_compat || ! $php_compat ) {
Note: See TracChangeset for help on using the changeset viewer.