Skip to content

Commit f153c23

Browse files
committed
Security: Replace update nag to indicate end of support for 4.2.
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 git-svn-id: https://develop.svn.wordpress.org/branches/4.2@60334 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d3c5f3a commit f153c23

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

src/wp-admin/css/common.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,26 @@ div.error {
13711371
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
13721372
}
13731373

1374+
.update-nag-core-insecure {
1375+
color: #fff;
1376+
background-color: #ac1b1b;
1377+
border-left-color: #cd5a5a;
1378+
font-weight: bold;
1379+
}
1380+
1381+
.update-nag-core-insecure > p:first-child {
1382+
margin-top: 0;
1383+
}
1384+
1385+
.update-nag-core-insecure > p:last-child {
1386+
margin-bottom: 0;
1387+
}
1388+
1389+
.update-nag-core-insecure a {
1390+
color: #fff;
1391+
text-decoration: underline;
1392+
}
1393+
13741394
.update-message {
13751395
color: #000;
13761396
}

src/wp-admin/includes/update.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,24 @@ function update_nag() {
206206

207207
if ( current_user_can('update_core') ) {
208208
$msg = sprintf( __('<a href="https://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="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
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+
);
211225
}
212-
echo "<div class='update-nag'>$msg</div>";
226+
echo "<div class='update-nag update-nag-core-insecure'><p>$msg</p><p>$msg_line2</p></div>";
213227
}
214228
add_action( 'admin_notices', 'update_nag', 3 );
215229
add_action( 'network_admin_notices', 'update_nag', 3 );

0 commit comments

Comments
 (0)