Make WordPress Core


Ignore:
Timestamp:
06/04/2008 06:09:31 PM (18 years ago)
Author:
ryan
Message:

Bulk delete/activate/deactivate for plugins. Split plugins into active and available lists. Props DD32. see #7091

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update.php

    r8010 r8049  
    119119add_action( 'load-plugins.php', 'wp_update_plugins' );
    120120
    121 function wp_plugin_update_row( $file ) {
    122     global $plugin_data;
     121function wp_plugin_update_row( $file, $plugin_data ) {
    123122    $current = get_option( 'update_plugins' );
    124123    if ( !isset( $current->response[ $file ] ) )
     
    127126    $r = $current->response[ $file ];
    128127
    129     echo "<tr><td colspan='5' class='plugin-update'>";
     128    echo '<tr><td colspan="5" class="plugin-update">';
    130129    if ( !current_user_can('edit_plugins') )
    131130        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);
     
    133132        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);
    134133    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    
    137     echo "</td></tr>";
    138 }
    139 add_action( 'after_plugin_row', 'wp_plugin_update_row' );
     134        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) );
     135   
     136    echo '</td></tr>';
     137}
     138add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );
    140139
    141140function wp_update_plugin($plugin, $feedback = '') {
Note: See TracChangeset for help on using the changeset viewer.