Make WordPress Core


Ignore:
Timestamp:
11/29/2022 10:05:16 PM (2 years ago)
Author:
peterwilsoncc
Message:

Security: Replace update nag to indicate end of support.

Replace update nag in WordPress 3.7 to indicate users need to update to a newer version of WordPress in order to continue receiving security updates.

Props peterwilsoncc, audrasjb.
Fixes #56786 for the 3.7 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7/src/wp-admin/includes/update.php

    r27884 r54901  
    211211
    212212    if ( current_user_can('update_core') ) {
    213         $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) );
     213        $msg       = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) );
     214        $msg_line2 = sprintf(
     215            /* translators: 1: WordPress version number, 2: Link to update WordPress */
     216            __( 'Important! Your version of WordPress (%1$s) is no longer supported, you will not receive any security updates for your website. To keep your site secure, please <a href="%2$s">update to the latest version of WordPress</a>.' ),
     217            get_bloginfo( 'version', 'display' ),
     218            network_admin_url( 'update-core.php' )
     219        );
    214220    } else {
    215         $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
    216     }
    217     echo "<div class='update-nag'>$msg</div>";
     221        $msg       = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
     222        $msg_line2 = sprintf(
     223            /* translators: 1: WordPress version number, 2: Link to update WordPress */
     224            __( 'Important! Your version of WordPress (%1$s) is no longer supported, you will not receive any security updates for your website. To keep your site secure, please <a href="%2$s">update to the latest version of WordPress</a>.' ),
     225            get_bloginfo( 'version', 'display' ),
     226            __( 'https://wordpress.org/download/' )
     227        );
     228    }
     229    echo "<div class='update-nag update-nag-core-insecure'><p>$msg</p><p>$msg_line2</p></div>";
    218230}
    219231add_action( 'admin_notices', 'update_nag', 3 );
Note: See TracChangeset for help on using the changeset viewer.