Ticket #50774: 50774.diff
File 50774.diff, 3.1 KB (added by , 4 years ago) |
---|
-
wp-admin/includes/class-wp-automatic-updater.php
1060 1060 1061 1061 foreach ( $failed_updates['plugin'] as $item ) { 1062 1062 $body[] = sprintf( 1063 /* translators: 1: Plugin name, 2: Version number. */1064 __( '- %1$s version %2$s' ),1063 /* translators: 1: Plugin name, 2: Current version number, 3: New version number. */ 1064 __( '- %1$s (from version %2$s to %3$s)' ), 1065 1065 $item->name, 1066 $item->item->current_version, 1066 1067 $item->item->new_version 1067 1068 ); 1068 1069 … … 1078 1079 1079 1080 foreach ( $failed_updates['theme'] as $item ) { 1080 1081 $body[] = sprintf( 1081 /* translators: 1: Theme name, 2: Version number. */1082 __( '- %1$s version %2$s' ),1082 /* translators: 1: Theme name, 2: Current version number, 3: New version number. */ 1083 __( '- %1$s (from version %2$s to %3$s)' ), 1083 1084 $item->name, 1085 $item->item->current_version, 1084 1086 $item->item->new_version 1085 1087 ); 1086 1088 … … 1101 1103 1102 1104 foreach ( $successful_updates['plugin'] as $item ) { 1103 1105 $body[] = sprintf( 1104 /* translators: 1: Plugin name, 2: Version number. */1105 __( '- %1$s version %2$s' ),1106 /* translators: 1: Plugin name, 2: Current version number, 3: New version number. */ 1107 __( '- %1$s (from version %2$s to %3$s)' ), 1106 1108 $item->name, 1109 $item->item->current_version, 1107 1110 $item->item->new_version 1108 1111 ); 1109 1112 … … 1119 1122 1120 1123 foreach ( $successful_updates['theme'] as $item ) { 1121 1124 $body[] = sprintf( 1122 /* translators: 1: Theme name, 2: Version number. */1123 __( '- %1$s version %2$s' ),1125 /* translators: 1: Theme name, 2: Current version number, 3: New version number. */ 1126 __( '- %1$s (from version %2$s to %3$s)' ), 1124 1127 $item->name, 1128 $item->item->current_version, 1125 1129 $item->item->new_version 1126 1130 ); 1127 1131 -
wp-includes/update.php
414 414 foreach ( $response['plugins'] as &$plugin ) { 415 415 $plugin = (object) $plugin; 416 416 417 $plugin->current_version = 'N/A'; 418 419 if ( isset( $plugins[ $plugin->plugin ] ) ) { 420 $plugin->current_version = $plugins[ $plugin->plugin ]['Version']; 421 } 422 417 423 if ( isset( $plugin->compatibility ) ) { 418 424 $plugin->compatibility = (object) $plugin->compatibility; 419 425 … … 620 626 $response = json_decode( wp_remote_retrieve_body( $raw_response ), true ); 621 627 622 628 if ( is_array( $response ) ) { 629 foreach ( $response['themes'] as &$theme ) { 630 $theme['current_version'] = 'N/A'; 631 632 if ( isset( $themes[ $theme['theme'] ] ) ) { 633 $theme['current_version'] = $themes[ $theme['theme'] ]['Version']; 634 } 635 } 636 637 unset( $theme ); 638 623 639 $new_update->response = $response['themes']; 624 640 $new_update->no_update = $response['no_update']; 625 641 $new_update->translations = $response['translations'];