Changeset 12157 for trunk/wp-admin/update-core.php
- Timestamp:
- 11/09/2009 06:53:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/update-core.php
r12107 r12157 134 134 135 135 function list_plugin_updates() { 136 global $wp_version; 137 138 $cur_wp_version = preg_replace('/-.*$/', '', $wp_version); 139 140 require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); 136 141 $plugins = get_plugin_updates(); 137 142 if ( empty($plugins) ) … … 161 166 <?php 162 167 foreach ( (array) $plugins as $plugin_file => $plugin_data) { 168 $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug )); 169 if ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) { 170 $compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version]; 171 $compat = ' ' . sprintf(__('Compatibility: %1$d%% (%2$d "works" votes out of %3$d total)'), $compat[0], $compat[2], $compat[1]); 172 } else { 173 $compat = ''; 174 } 163 175 echo " 164 176 <tr class='active'> 165 177 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th> 166 <td class='plugin-title'><strong>{$plugin_data->Name}</strong>" . sprintf(__('You are running version %1$s. Upgrade to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . "</td>178 <td class='plugin-title'><strong>{$plugin_data->Name}</strong>" . sprintf(__('You are running version %1$s. Upgrade to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . $compat . "</td> 167 179 </tr>"; 168 180 } … … 301 313 $title = __('Upgrade Plugins'); 302 314 $nonce = 'upgrade-core'; 303 add_filter('update_plugin_complete_actions', 'no_update_actions');304 305 315 $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) ); 306 316 $upgrader->bulk_upgrade($plugins);
Note: See TracChangeset
for help on using the changeset viewer.