Changeset 20236 for trunk/wp-admin/includes/class-wp-plugins-list-table.php
- Timestamp:
- 03/21/2012 04:19:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-plugins-list-table.php
r20046 r20236 66 66 $plugins['dropins'] = get_dropins(); 67 67 68 $current = get_site_transient( 'update_plugins' ); 69 foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { 70 if ( isset( $current->response[ $plugin_file ] ) ) 71 $plugins['upgrade'][ $plugin_file ] = $plugin_data; 68 if ( current_user_can( 'update_plugins' ) ) { 69 $current = get_site_transient( 'update_plugins' ); 70 foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { 71 if ( isset( $current->response[ $plugin_file ] ) ) { 72 $plugins['all'][ $plugin_file ]['update'] = true; 73 $plugins['upgrade'][ $plugin_file ] = $plugins['all'][ $plugin_file ]; 74 } 75 } 72 76 } 73 77 } … … 101 105 } 102 106 103 if ( !current_user_can( 'update_plugins' ) )104 $plugins['upgrade'] = array();105 106 107 if ( $s ) { 107 108 $status = 'search'; … … 313 314 314 315 function single_row( $plugin_file, $plugin_data ) { 315 global $status, $page, $s ;316 global $status, $page, $s, $totals; 316 317 317 318 $context = $status; … … 395 396 396 397 $id = sanitize_title( $plugin_name ); 398 if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) ) 399 $class .= ' update'; 397 400 398 401 echo "<tr id='$id' class='$class'>";
Note: See TracChangeset
for help on using the changeset viewer.