Ticket #4869: 4869.2.diff
File 4869.2.diff, 1.4 KB (added by , 18 years ago) |
---|
-
wp-admin/includes/update.php
3 3 // The admin side of our 1.0 update system 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 8 11 switch ( $cur->response ) { … … 23 26 add_filter( 'update_footer', 'core_update_footer' ); 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 ); 36 42 … … 109 115 } 110 116 add_action( 'after_plugin_row', 'wp_plugin_update_row' ); 111 117 112 ?> 118 ?> 119 No newline at end of file