Changeset 12407 for trunk/wp-admin/update-core.php
- Timestamp:
- 12/15/2009 07:09:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/update-core.php
r12374 r12407 144 144 return; 145 145 $form_action = 'update-core.php?action=do-plugin-upgrade'; 146 147 $core_updates = get_core_updates(); 148 if ( !isset($core_updates[0]->response) || 'latest' == $core_updates[0]->response || 'development' == $core_updates[0]->response ) 149 $core_update_version = false; 150 else 151 $core_update_version = $core_updates[0]->current; 146 152 ?> 147 153 <h3><?php _e('Plugins'); ?></h3> … … 168 174 foreach ( (array) $plugins as $plugin_file => $plugin_data) { 169 175 $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug )); 176 // Get plugin compat for running version of WordPress. 170 177 if ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) { 171 178 $compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version]; 172 $compat = ' ' . sprintf(__('Compatibility: %1$d%% (%2$d "works" votes out of %3$d total)'), $compat[0], $compat[2], $compat[1]);179 $compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $cur_wp_version, $compat[0], $compat[2], $compat[1]); 173 180 } else { 174 $compat = ''; 175 } 181 $compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: Unknown)'), $cur_wp_version); 182 } 183 // Get plugin compat for updated version of WordPress. 184 if ( $core_update_version ) { 185 if ( isset($info->compatibility[$core_update_version][$plugin_data->update->new_version]) ) { 186 $update_compat = $info->compatibility[$core_update_version][$plugin_data->update->new_version]; 187 $compat .= '<br />' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $core_update_version, $update_compat[0], $update_compat[2], $update_compat[1]); 188 } else { 189 $compat .= '<br />' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $core_update_version); 190 } 191 } 192 // Get the upgrade notice for the new plugin version. 176 193 if ( isset($plugin_data->update->upgrade_notice) ) { 177 194 $upgrade_notice = '<br />' . strip_tags($plugin_data->update->upgrade_notice);
Note: See TracChangeset
for help on using the changeset viewer.