Make WordPress Core

Ticket #10464: plugin_update_rows_patch.diff

File plugin_update_rows_patch.diff, 922 bytes (added by strider72, 17 years ago)
  • wp-admin/includes/update.php

     
    145145        echo "<span id='wp-version-message'>$msg</span>";
    146146}
    147147
     148function wp_plugin_update_rows() {
     149        $plugins = get_transient( 'update_plugins' );
     150        $plugins = array_keys( $plugins->response );
     151        foreach( $plugins as $plugin_file ) {
     152                add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
     153        }
     154}
     155add_action( 'admin_init', 'wp_plugin_update_rows' );
     156
    148157function wp_plugin_update_row( $file, $plugin_data ) {
    149158        $current = get_transient( 'update_plugins' );
    150159        if ( !isset( $current->response[ $file ] ) )
    … …  
    169178
    170179        echo '</div></td></tr>';
    171180}
    172 add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );
    173181
    174182function wp_update_plugin($plugin, $feedback = '') {
    175183