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/includes/update.php

    r43571 r44451  
    263263    }
    264264
     265    $version_url = sprintf(
     266        /* translators: %s: WordPress version */
     267        esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
     268        sanitize_title( $cur->current )
     269    );
     270
    265271    if ( current_user_can( 'update_core' ) ) {
    266272        $msg = sprintf(
    267             /* translators: 1: Codex URL to release notes, 2: new WordPress version, 3: URL to network admin, 4: accessibility text */
     273            /* translators: 1: URL to WordPress release notes, 2: new WordPress version, 3: URL to network admin, 4: accessibility text */
    268274            __( '<a href="%1$s">WordPress %2$s</a> is available! <a href="%3$s" aria-label="%4$s">Please update now</a>.' ),
    269             sprintf(
    270                 /* translators: %s: WordPress version */
    271                 esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ),
    272                 $cur->current
    273             ),
     275            $version_url,
    274276            $cur->current,
    275277            network_admin_url( 'update-core.php' ),
     
    278280    } else {
    279281        $msg = sprintf(
    280             /* translators: 1: Codex URL to release notes, 2: new WordPress version */
     282            /* translators: 1: URL to WordPress release notes, 2: new WordPress version */
    281283            __( '<a href="%1$s">WordPress %2$s</a> is available! Please notify the site administrator.' ),
    282             sprintf(
    283                 /* translators: %s: WordPress version */
    284                 esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ),
    285                 $cur->current
    286             ),
     284            $version_url,
    287285            $cur->current
    288286        );
Note: See TracChangeset for help on using the changeset viewer.