Ticket #31470: 31470.2.patch
File 31470.2.patch, 1.8 KB (added by , 10 years ago) |
---|
-
src/wp-admin/includes/update.php
204 204 if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) 205 205 return false; 206 206 207 if ( current_user_can('update_core') ) { 208 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) ); 209 } else { 210 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current ); 207 if ( current_user_can( 'update_core' ) ) { 208 $msg = sprintf( __( '<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.' ), $cur->current, network_admin_url( 'update-core.php' ) ); 209 echo "<div class='update-nag'>$msg</div>"; 211 210 } 212 echo "<div class='update-nag'>$msg</div>";213 211 } 214 212 add_action( 'admin_notices', 'update_nag', 3 ); 215 213 add_action( 'network_admin_notices', 'update_nag', 3 ); … … 422 420 if ( ! $nag ) 423 421 return false; 424 422 425 if ( current_user_can( 'update_core') )426 $msg = sprintf( __( 'An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update-core.php' );427 else428 $msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.');423 if ( current_user_can( 'update_core' ) ) { 424 $msg = sprintf( __( 'An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.' ), 'update-core.php' ); 425 echo "<div class='update-nag'>$msg</div>"; 426 } 429 427 430 428 echo "<div class='update-nag'>$msg</div>"; 431 429 }