Ticket #34434: patch.diff
File patch.diff, 1.7 KB (added by , 9 years ago) |
---|
-
wp-admin/includes/class-wp-upgrader.php
3390 3390 } 3391 3391 3392 3392 // Plugins, Themes, Translations 3393 $update_types = array(); 3393 3394 foreach ( array( 'plugin', 'theme', 'translation' ) as $type ) { 3394 3395 3395 3396 /** … … 3419 3420 'translation' => __( 'The following translations were successfully updated:' ), 3420 3421 ); 3421 3422 3422 $ body[] = $messages[ $type ];3423 $update_types[] = $messages[ $type ]; 3423 3424 foreach ( wp_list_pluck( $success_items, 'name' ) as $name ) { 3424 $ body[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name );3425 $update_types[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name ); 3425 3426 } 3426 3427 } 3427 3428 if ( $success_items != $this->update_results[ $type ] ) { … … 3432 3433 'translation' => __( 'The following translations failed to update:' ), 3433 3434 ); 3434 3435 3435 $ body[] = $messages[ $type ];3436 $update_types[] = $messages[ $type ]; 3436 3437 foreach ( $this->update_results[ $type ] as $item ) { 3437 3438 if ( ! $item->result || is_wp_error( $item->result ) ) { 3438 $ body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name );3439 $update_types[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name ); 3439 3440 $failures++; 3440 3441 } 3441 3442 } 3442 3443 } 3443 $ body[] = '';3444 $update_types[] = ''; 3444 3445 } 3445 3446 3446 if ( empty( $ body) ) {3447 if ( empty( $update_types ) && !isset( $this->update_results['core'] ) ) { 3447 3448 return; 3448 } 3449 } else { 3450 array_merge( $body, $update_types ); 3451 } 3449 3452 3450 3453 $site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ); 3451 3454 if ( $failures ) {