Security: Replace update nag to indicate end of support.

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


Built from https://develop.svn.wordpress.org/branches/3.8@54900


git-svn-id: http://core.svn.wordpress.org/branches/3.8@54452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2022-11-29 22:04:14 +00:00
parent d4d2472e6d
commit c1dfe27899
23 changed files with 85 additions and 21 deletions

View File

@ -606,6 +606,16 @@ div.updated,
box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1);
}
.update-nag-core-insecure {
color: #fff;
background-color: #ac1b1b;
border-right-color: #cd5a5a;
}
.update-nag-core-insecure a {
color: #fff;
}
div.error,
.login #login_error {
background: #fff;

File diff suppressed because one or more lines are too long

View File

@ -606,6 +606,16 @@ div.updated,
box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1);
}
.update-nag-core-insecure {
color: #fff;
background-color: #ac1b1b;
border-left-color: #cd5a5a;
}
.update-nag-core-insecure a {
color: #fff;
}
div.error,
.login #login_error {
background: #fff;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1452,6 +1452,22 @@ th.action-links {
margin: 25px 2px 0 20px;
}
.update-nag-core-insecure {
font-weight: bold;
}
.update-nag-core-insecure > p:first-child {
margin-top: 0;
}
.update-nag-core-insecure > p:last-child {
margin-bottom: 0;
}
.update-nag-core-insecure a {
text-decoration: underline;
}
.plugins .plugin-update {
padding: 0;
}

File diff suppressed because one or more lines are too long

View File

@ -1452,6 +1452,22 @@ th.action-links {
margin: 25px 20px 0 2px;
}
.update-nag-core-insecure {
font-weight: bold;
}
.update-nag-core-insecure > p:first-child {
margin-top: 0;
}
.update-nag-core-insecure > p:last-child {
margin-bottom: 0;
}
.update-nag-core-insecure a {
text-decoration: underline;
}
.plugins .plugin-update {
padding: 0;
}

File diff suppressed because one or more lines are too long

View File

@ -210,11 +210,23 @@ function update_nag() {
return false;
if ( current_user_can('update_core') ) {
$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' ) );
$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' ) );
$msg_line2 = sprintf(
/* translators: 1: WordPress version number, 2: Link to update WordPress */
__( '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>.' ),
get_bloginfo( 'version', 'display' ),
network_admin_url( 'update-core.php' )
);
} else {
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
$msg_line2 = sprintf(
/* translators: 1: WordPress version number, 2: Link to update WordPress */
__( '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>.' ),
get_bloginfo( 'version', 'display' ),
__( 'https://wordpress.org/download/' )
);
}
echo "<div class='update-nag'>$msg</div>";
echo "<div class='update-nag update-nag-core-insecure'><p>$msg</p><p>$msg_line2</p></div>";
}
add_action( 'admin_notices', 'update_nag', 3 );
add_action( 'network_admin_notices', 'update_nag', 3 );