Changeset 8049 for trunk/wp-admin/includes/update.php
- Timestamp:
- 06/04/2008 06:09:31 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/update.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update.php
r8010 r8049 119 119 add_action( 'load-plugins.php', 'wp_update_plugins' ); 120 120 121 function wp_plugin_update_row( $file ) { 122 global $plugin_data; 121 function wp_plugin_update_row( $file, $plugin_data ) { 123 122 $current = get_option( 'update_plugins' ); 124 123 if ( !isset( $current->response[ $file ] ) ) … … 127 126 $r = $current->response[ $file ]; 128 127 129 echo "<tr><td colspan='5' class='plugin-update'>";128 echo '<tr><td colspan="5" class="plugin-update">'; 130 129 if ( !current_user_can('edit_plugins') ) 131 130 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); … … 133 132 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 133 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&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&plugin=' . $file, 'upgrade-plugin_' . $file) ); 135 136 echo '</td></tr>'; 137 } 138 add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 ); 140 139 141 140 function wp_update_plugin($plugin, $feedback = '') {
Note: See TracChangeset
for help on using the changeset viewer.