Better styling for update notice, fixes #1476
git-svn-id: https://develop.svn.wordpress.org/trunk@5904 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
38a4fd8947
commit
bb24dac060
|
@ -14,7 +14,6 @@ function core_update_footer( $msg ) {
|
|||
break;
|
||||
|
||||
case 'upgrade' :
|
||||
add_action( 'admin_footer', 'update_nag' );
|
||||
return sprintf( __( '| <strong>Your WordPress %s is out of date. <a href="%s">Please update</a>.</strong>' ), $GLOBALS['wp_version'], $cur->url );
|
||||
break;
|
||||
|
||||
|
@ -28,19 +27,14 @@ add_filter( 'update_footer', 'core_update_footer' );
|
|||
|
||||
function update_nag() {
|
||||
$cur = get_option( 'update_core' );
|
||||
|
||||
if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
|
||||
return false;
|
||||
|
||||
?>
|
||||
<div id="update-nag"><?php printf( __('Update Available! <a href="%s">Please upgrade now</a>.'), $cur->url ); ?></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function update_nag_body( $class ) {
|
||||
$cur = get_option( 'update_core' );
|
||||
|
||||
if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
|
||||
return $class;
|
||||
|
||||
return "nagtime $class";
|
||||
}
|
||||
add_filter( 'admin_body_class', 'update_nag_body' );
|
||||
add_action( 'admin_notices', 'update_nag', 3 );
|
||||
|
||||
?>
|
|
@ -1331,21 +1331,16 @@ a.view-link {
|
|||
}
|
||||
|
||||
#update-nag {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-bottom: 2px solid #911;
|
||||
border-bottom: 1px solid #ccc;
|
||||
background: #fffeeb;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
height: 18px;
|
||||
line-height: 29px;
|
||||
font-size: 12px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.nagtime {
|
||||
padding-top: 15px;
|
||||
#update-nag a {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.nagtime #user_info {
|
||||
top: 17px ;
|
||||
#update-nag a:link {
|
||||
color: #036;
|
||||
}
|
Loading…
Reference in New Issue