Make WordPress Core

Ticket #31470: 31470.2.patch

File 31470.2.patch, 1.8 KB (added by ocean90, 10 years ago)
  • src/wp-admin/includes/update.php

     
    204204        if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
    205205                return false;
    206206
    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>";
    211210        }
    212         echo "<div class='update-nag'>$msg</div>";
    213211}
    214212add_action( 'admin_notices', 'update_nag', 3 );
    215213add_action( 'network_admin_notices', 'update_nag', 3 );
     
    422420        if ( ! $nag )
    423421                return false;
    424422
    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         else
    428                 $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        }
    429427
    430428        echo "<div class='update-nag'>$msg</div>";
    431429}