Make WordPress Core


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

Better styling for update notice, fixes #1476

File:
1 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?>
Note: See TracChangeset for help on using the changeset viewer.