Make WordPress Core

Changeset 60333


Ignore:
Timestamp:
06/22/2025 10:23:08 PM (9 months ago)
Author:
johnbillion
Message:

Security: Replace update nag to indicate end of support for 4.1.

Replaces the update nag to indicate that users need to update to a newer version of WordPress in order to continue receiving security updates.

Props audrasjb, peterwilsoncc, SirLouen

See #63595

Location:
branches/4.1/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/src/wp-admin/css/common.css

    r30957 r60333  
    13111311    -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    13121312    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
     1313}
     1314
     1315.update-nag-core-insecure {
     1316    color: #fff;
     1317    background-color: #ac1b1b;
     1318    border-left-color: #cd5a5a;
     1319    font-weight: bold;
     1320}
     1321
     1322.update-nag-core-insecure > p:first-child {
     1323    margin-top: 0;
     1324}
     1325
     1326.update-nag-core-insecure > p:last-child {
     1327    margin-bottom: 0;
     1328}
     1329
     1330.update-nag-core-insecure a {
     1331    color: #fff;
     1332    text-decoration: underline;
    13131333}
    13141334
  • branches/4.1/src/wp-admin/includes/update.php

    r30648 r60333  
    207207    if ( current_user_can('update_core') ) {
    208208        $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' ) );
     209
     210        $msg_line2 = sprintf(
     211            /* translators: 1: WordPress version number, 2: Link to update WordPress */
     212            __( '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>.' ),
     213            get_bloginfo( 'version', 'display' ),
     214            network_admin_url( 'update-core.php' )
     215        );
    209216    } else {
    210217        $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
    211     }
    212     echo "<div class='update-nag'>$msg</div>";
     218
     219        $msg_line2 = sprintf(
     220            /* translators: 1: WordPress version number, 2: Link to update WordPress */
     221            __( '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>.' ),
     222            get_bloginfo( 'version', 'display' ),
     223            __( 'https://wordpress.org/download/' )
     224        );
     225    }
     226    echo "<div class='update-nag update-nag-core-insecure'><p>$msg</p><p>$msg_line2</p></div>";
    213227}
    214228add_action( 'admin_notices', 'update_nag', 3 );
Note: See TracChangeset for help on using the changeset viewer.