Make WordPress Core

Changeset 5904


Ignore:
Timestamp:
08/20/2007 07:01:15 AM (17 years ago)
Author:
matt
Message:

Better styling for update notice, fixes #1476

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update.php

    r5892 r5904  
    1515
    1616    case 'upgrade' :
    17         add_action( 'admin_footer', 'update_nag' );
    1817        return sprintf( __( '| <strong>Your WordPress %s is out of date. <a href="%s">Please update</a>.</strong>' ), $GLOBALS['wp_version'], $cur->url );
    1918    break;
     
    2928function update_nag() {
    3029$cur = get_option( 'update_core' );
     30
     31if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
     32    return false;
     33
    3134?>
    3235<div id="update-nag"><?php printf( __('Update Available! <a href="%s">Please upgrade now</a>.'), $cur->url ); ?></div>
    3336<?php
    3437}
    35 
    36 function update_nag_body( $class ) {
    37     $cur = get_option( 'update_core' );
    38    
    39     if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
    40         return $class;
    41 
    42     return "nagtime $class";
    43 }
    44 add_filter( 'admin_body_class', 'update_nag_body' );
     38add_action( 'admin_notices', 'update_nag', 3 );
    4539
    4640?>
  • trunk/wp-admin/wp-admin.css

    r5892 r5904  
    13321332
    13331333#update-nag {
    1334     width: 100%;
    1335     position: absolute;
    1336     top: 0;
    1337     left: 0;
    1338     background: #fff;
    1339     border-bottom: 2px solid #911;
     1334    border-bottom: 1px solid #ccc;
     1335    background: #fffeeb;
    13401336    text-align: center;
    1341     font-size: 11px;
    1342     height: 18px;
    1343 }
    1344 
    1345 .nagtime {
    1346     padding-top: 15px;
    1347 }
    1348 
    1349 .nagtime #user_info {
    1350     top: 17px ;
    1351 }
     1337    line-height: 29px;
     1338    font-size: 12px;
     1339    color: #555;
     1340}
     1341#update-nag a {
     1342    font-size: 1.1em;
     1343}
     1344#update-nag a:link {
     1345    color: #036;
     1346}
Note: See TracChangeset for help on using the changeset viewer.