Changeset 5994
- Timestamp:
- 08/30/2007 06:21:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update.php
r5987 r5994 4 4 5 5 function core_update_footer( $msg ) { 6 if ( !current_user_can('manage_options') ) 7 return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'] ); 8 6 9 $cur = get_option( 'update_core' ); 7 10 … … 24 27 25 28 function update_nag() { 26 $cur = get_option( 'update_core' );29 $cur = get_option( 'update_core' ); 27 30 28 if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )29 return false;31 if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) 32 return false; 30 33 31 ?> 32 <div id="update-nag"><?php printf( __('A new version of WordPress is available! <a href="%s">Please update now</a>.'), $cur->url ); ?></div> 33 <?php 34 if ( current_user_can('manage_options') ) 35 $msg = sprintf( __('A new version of WordPress is available! <a href="%s">Please update now</a>.'), $cur->url ); 36 else 37 $msg = __('A new version of WordPress is available! Please notify the site administrator.'); 38 39 echo "<div id='update-nag'>$msg</div>"; 34 40 } 35 41 add_action( 'admin_notices', 'update_nag', 3 );
Note: See TracChangeset
for help on using the changeset viewer.