Changeset 20236
- Timestamp:
- 03/21/2012 04:19:27 PM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin.dev.css
r20201 r20236 4426 4426 } 4427 4427 4428 #wpbody-content .plugins .plugin-title, #wpbody-content .plugins .theme-title { 4428 .plugins .update th, 4429 .plugins .update td { 4430 border-bottom: 0; 4431 } 4432 .plugin-update-tr td { 4433 border-top: 0; 4434 } 4435 4436 #wpbody-content .plugins .plugin-title, 4437 #wpbody-content .plugins .theme-title { 4429 4438 padding-right: 12px; 4430 4439 white-space:nowrap; 4431 4440 } 4432 4441 4433 .plugins .second, .plugins .row-actions-visible { 4442 .plugins .second, 4443 .plugins .row-actions-visible { 4434 4444 padding: 0 0 5px; 4445 } 4446 4447 .plugins .update .second, 4448 .plugins .update .row-actions-visible { 4449 padding-bottom: 0; 4435 4450 } 4436 4451 -
trunk/wp-admin/includes/class-wp-ms-themes-list-table.php
r20160 r20236 72 72 } 73 73 74 $maybe_update = current_user_can( 'update_themes' ) && ! $this->is_site_themes && get_site_transient( 'update_themes' );74 $maybe_update = current_user_can( 'update_themes' ) && ! $this->is_site_themes && $current = get_site_transient( 'update_themes' ); 75 75 76 76 foreach ( (array) $themes['all'] as $key => $theme ) { … … 80 80 } 81 81 82 if ( $maybe_update && isset( $current->response[ $key ] ) ) { 83 $themes['all'][ $key ]->update = true; 84 $themes['upgrade'][ $key ] = $themes['all'][ $key ]; 85 } 86 82 87 $filter = $theme->is_allowed( $allowed_where, $this->site_id ) ? 'enabled' : 'disabled'; 83 88 $themes[ $filter ][ $key ] = $themes['all'][ $key ]; 84 85 if ( $maybe_update && isset( $current->response[ $key ] ) )86 $themes['upgrade'][ $key ] = $themes['all'][ $key ];87 89 } 88 90 … … 262 264 263 265 function single_row( $key, $theme ) { 264 global $status, $page, $s ;266 global $status, $page, $s, $totals; 265 267 266 268 $context = $status; … … 305 307 306 308 $id = sanitize_html_class( $theme->get_stylesheet() ); 309 310 if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) 311 $class .= ' update'; 307 312 308 313 echo "<tr id='$id' class='$class'>"; -
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'>"; -
trunk/wp-admin/includes/theme.php
r20041 r20236 136 136 printf( '<p><strong>' . __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s details</a>. <em>Automatic update is unavailable for this theme.</em>') . '</strong></p>', $theme_name, $details_url, $update['new_version']); 137 137 else 138 printf( '<p><strong>' . __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s details</a> or <a href="%4$s" %5$s>update automatically</a>.') . '</strong></p>', $theme_name, $details_url, $update['new_version'], $update_url, $update_onclick );138 printf( '<p><strong>' . __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s details</a> or <a href="%4$s" %5$s>update now</a>.') . '</strong></p>', $theme_name, $details_url, $update['new_version'], $update_url, $update_onclick ); 139 139 } 140 140 } -
trunk/wp-admin/includes/update.php
r20029 r20236 200 200 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); 201 201 else 202 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) );202 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) ); 203 203 204 204 do_action( "in_plugin_update_message-$file", $plugin_data, $r ); … … 272 272 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'] ); 273 273 else 274 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update automatically</a>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url( self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key) );274 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url( self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key) ); 275 275 276 276 do_action( "in_theme_update_message-$theme_key", $theme, $r );
Note: See TracChangeset
for help on using the changeset viewer.