- Timestamp:
- 07/08/2020 01:13:50 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-automatic-updater.php
r48397 r48408 945 945 $past_failure_emails = get_option( 'auto_plugin_theme_update_emails', array() ); 946 946 947 // When only failures have occurred, an email should only be sent if there are unique failures. 948 // A failure is considered unique if an email has not been sent for an update attempt failure 949 // to a plugin or theme with the same new_version. 947 /* 948 * When only failures have occurred, an email should only be sent if there are unique failures. 949 * A failure is considered unique if an email has not been sent for an update attempt failure 950 * to a plugin or theme with the same new_version. 951 */ 950 952 if ( 'fail' === $type ) { 951 953 foreach ( $failed_updates as $update_type => $failures ) { … … 1044 1046 1045 1047 foreach ( $failed_updates['plugin'] as $item ) { 1046 $body[] = "- {$item->name}"; 1048 $body[] = "- {$item->name}"; 1049 1047 1050 $past_failure_emails[ $item->item->plugin ] = $item->item->new_version; 1048 1051 } 1052 1049 1053 $body[] = "\n"; 1050 1054 } … … 1055 1059 1056 1060 foreach ( $failed_updates['theme'] as $item ) { 1057 $body[] = "- {$item->name}"; 1061 $body[] = "- {$item->name}"; 1062 1058 1063 $past_failure_emails[ $item->item->theme ] = $item->item->new_version; 1059 1064 } 1065 1060 1066 $body[] = "\n"; 1061 1067 } … … 1072 1078 foreach ( $successful_updates['plugin'] as $item ) { 1073 1079 $body[] = "- {$item->name}"; 1080 1074 1081 unset( $past_failure_emails[ $item->item->plugin ] ); 1075 1082 } 1083 1076 1084 $body[] = "\n"; 1077 1085 } … … 1080 1088 if ( ! empty( $successful_updates['theme'] ) ) { 1081 1089 $body[] = __( 'These themes are now up to date:' ); 1082 // List successful updates. 1090 1083 1091 foreach ( $successful_updates['theme'] as $item ) { 1084 1092 $body[] = "- {$item->name}"; 1093 1085 1094 unset( $past_failure_emails[ $item->item->theme ] ); 1086 1095 } 1096 1087 1097 $body[] = "\n"; 1088 1098 }
Note: See TracChangeset
for help on using the changeset viewer.