WordPress.org

Make WordPress Core

Ticket #9553: update.php.diff

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

     
    145145        echo "<span id='wp-version-message'>$msg</span>";
    146146}
    147147
    148 function wp_plugin_update_row( $file, $plugin_data ) {
     148function wp_plugin_update_row( $file, $plugin_data, $context ) {
    149149        $current = get_transient( 'update_plugins' );
    150150        if ( !isset( $current->response[ $file ] ) )
    151151                return false;
     
    161161                printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s Details</a> <em>automatic upgrade unavailable for this plugin</em>.'), $plugin_data['Name'], $details_url, $r->new_version);
    162162        else
    163163                printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s Details</a> or <a href="%4$s">upgrade automatically</a>.'), $plugin_data['Name'], $details_url, $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&amp;plugin=' . $file, 'upgrade-plugin_' . $file) );
    164 
     164       
     165        do_action( 'after_plugin_update_message', $file, $plugin_data, $context, $r );
     166       
    165167        echo '</td></tr>';
    166168}
    167 add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );
     169add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 3 );
    168170
    169171function wp_update_plugin($plugin, $feedback = '') {
    170172        global $wp_filesystem;