Skip to content

Commit 80d5521

Browse files
committed
Security: Replace update nag to indicate end of support for 4.6.
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.6@60338 602fd350-edb4-49c9-b593-d223f7449a82
1 parent be97689 commit 80d5521

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

src/wp-admin/css/common.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,30 @@ div.error {
14871487
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
14881488
}
14891489

1490+
.update-nag-core-insecure {
1491+
color: #fff;
1492+
background-color: #ac1b1b;
1493+
border-left-color: #cd5a5a;
1494+
font-weight: bold;
1495+
}
1496+
1497+
.update-nag-core-insecure > p:first-child {
1498+
margin-top: 0;
1499+
}
1500+
1501+
.update-nag-core-insecure > p:last-child {
1502+
margin-bottom: 0;
1503+
}
1504+
1505+
.update-nag-core-insecure a {
1506+
color: #fff;
1507+
text-decoration: underline;
1508+
}
1509+
1510+
.update-message {
1511+
color: #000;
1512+
}
1513+
14901514
ul#dismissed-updates {
14911515
display: none;
14921516
}

src/wp-admin/includes/update.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,13 @@ function update_nag() {
243243
network_admin_url( 'update-core.php' ),
244244
esc_attr__( 'Please update WordPress now' )
245245
);
246+
247+
$msg_line2 = sprintf(
248+
/* translators: 1: WordPress version number, 2: Link to update WordPress */
249+
__( '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>.' ),
250+
get_bloginfo( 'version', 'display' ),
251+
network_admin_url( 'update-core.php' )
252+
);
246253
} else {
247254
$msg = sprintf(
248255
/* translators: 1: Codex URL to release notes, 2: new WordPress version */
@@ -254,8 +261,15 @@ function update_nag() {
254261
),
255262
$cur->current
256263
);
264+
265+
$msg_line2 = sprintf(
266+
/* translators: 1: WordPress version number, 2: Link to update WordPress */
267+
__( '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>.' ),
268+
get_bloginfo( 'version', 'display' ),
269+
__( 'https://wordpress.org/download/' )
270+
);
257271
}
258-
echo "<div class='update-nag'>$msg</div>";
272+
echo "<div class='update-nag update-nag-core-insecure'><p>$msg</p><p>$msg_line2</p></div>";
259273
}
260274

261275
// Called directly from dashboard

0 commit comments

Comments
 (0)