Security: Replace update nag to indicate end of support.
Replace update nag in WordPress 3.7 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.7 branch. Built from https://develop.svn.wordpress.org/branches/3.7@54901 git-svn-id: http://core.svn.wordpress.org/branches/3.7@54453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
58555d9e66
commit
177c730e70
|
@ -734,6 +734,16 @@ table.widefat span.spam a,
|
||||||
color: #555;
|
color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #ac1b1b;
|
||||||
|
border-color: #cd5a5a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
#screen-meta {
|
#screen-meta {
|
||||||
background-color: #eff8ff;
|
background-color: #eff8ff;
|
||||||
border-color: #d1e5ee;
|
border-color: #d1e5ee;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -732,6 +732,16 @@ table.widefat span.spam a,
|
||||||
color: #555;
|
color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #ac1b1b;
|
||||||
|
border-color: #cd5a5a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
#screen-meta {
|
#screen-meta {
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
border-color: #ccc;
|
border-color: #ccc;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1123,6 +1123,31 @@ th.action-links {
|
||||||
border-bottom-left-radius: 3px;
|
border-bottom-left-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #ac1b1b;
|
||||||
|
border-color: #cd5a5a;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure > p {
|
||||||
|
margin-left: 1em;
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure > p:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
clear: right; /* Screen options, help tabs */
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure > p:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-nag-core-insecure a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.plugins .plugin-update {
|
.plugins .plugin-update {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -211,10 +211,22 @@ function update_nag() {
|
||||||
|
|
||||||
if ( current_user_can('update_core') ) {
|
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 {
|
} 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( 'admin_notices', 'update_nag', 3 );
|
||||||
add_action( 'network_admin_notices', 'update_nag', 3 );
|
add_action( 'network_admin_notices', 'update_nag', 3 );
|
||||||
|
|
Loading…
Reference in New Issue