Make WordPress Core


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

Security: Replace update nag to indicate end of support.

Replace update nag in WordPress 4.0 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 4.0 branch.

File:
1 edited

Legend:

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

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