Skip to content

Commit a8aa5eb

Browse files
committed
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 git-svn-id: https://develop.svn.wordpress.org/branches/4.1@60333 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0d7b255 commit a8aa5eb

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
@@ -1312,6 +1312,26 @@ div.error {
13121312
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
13131313
}
13141314

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;
1333+
}
1334+
13151335
.update-message {
13161336
color: #000;
13171337
}

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="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 );
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)