WordPress.org

Make WordPress Core

Ticket #6248: 6248.2.diff

File 6248.2.diff, 1.4 KB (added by DD32, 6 years ago)
  • wp-admin/includes/update.php

     
    127127        $r = $current->response[ $file ]; 
    128128 
    129129        echo "<tr><td colspan='5' class='plugin-update'>"; 
    130         printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> or <a href="%4$s">upgrade automatically</a>.'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url("update.php?action=upgrade-plugin&amp;plugin=$file", 'upgrade-plugin_' . $file) ); 
     130        if( current_user_can('edit_plugins') ) 
     131                printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a>.'), $plugin_data['Name'], $r->url, $r->new_version); 
     132        else if( empty($r->package) ) 
     133                printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> <em>automatic upgrade unavailable for this plugin</em>.'), $plugin_data['Name'], $r->url, $r->new_version); 
     134        else 
     135                printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> or <a href="%4$s">upgrade automatically</a>.'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url("update.php?action=upgrade-plugin&amp;plugin=$file", 'upgrade-plugin_' . $file) ); 
     136         
    131137        echo "</td></tr>"; 
    132138} 
    133139add_action( 'after_plugin_row', 'wp_plugin_update_row' );