mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-23 06:55:28 +00:00
Better styling for update notice, fixes #1476
git-svn-id: http://svn.automattic.com/wordpress/trunk@5904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f273f7a17b
commit
7bacf89b7e
@ -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…
x
Reference in New Issue
Block a user