Skip to content

Commit 1ad399a

Browse files
committed
Security: Replace update nag to indicate end of support for 4.5.
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.5@60337 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 029adc6 commit 1ad399a

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
@@ -1426,6 +1426,26 @@ div.error {
14261426
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
14271427
}
14281428

1429+
.update-nag-core-insecure {
1430+
color: #fff;
1431+
background-color: #ac1b1b;
1432+
border-left-color: #cd5a5a;
1433+
font-weight: bold;
1434+
}
1435+
1436+
.update-nag-core-insecure > p:first-child {
1437+
margin-top: 0;
1438+
}
1439+
1440+
.update-nag-core-insecure > p:last-child {
1441+
margin-bottom: 0;
1442+
}
1443+
1444+
.update-nag-core-insecure a {
1445+
color: #fff;
1446+
text-decoration: underline;
1447+
}
1448+
14291449
.update-message {
14301450
color: #000;
14311451
}

src/wp-admin/includes/update.php

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

233233
if ( current_user_can('update_core') ) {
234234
$msg = sprintf( __( '<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s" aria-label="Please update WordPress now">Please update now</a>.' ), $cur->current, network_admin_url( 'update-core.php' ) );
235+
236+
$msg_line2 = sprintf(
237+
/* translators: 1: WordPress version number, 2: Link to update WordPress */
238+
__( '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>.' ),
239+
get_bloginfo( 'version', 'display' ),
240+
network_admin_url( 'update-core.php' )
241+
);
235242
} else {
236243
$msg = sprintf( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
244+
245+
$msg_line2 = sprintf(
246+
/* translators: 1: WordPress version number, 2: Link to update WordPress */
247+
__( '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>.' ),
248+
get_bloginfo( 'version', 'display' ),
249+
__( 'https://wordpress.org/download/' )
250+
);
237251
}
238-
echo "<div class='update-nag'>$msg</div>";
252+
echo "<div class='update-nag update-nag-core-insecure'><p>$msg</p><p>$msg_line2</p></div>";
239253
}
240254

241255
// Called directly from dashboard

0 commit comments

Comments
 (0)