Changeset 54212
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-automatic-updater.php
r54200 r54212 1102 1102 1103 1103 foreach ( $failed_updates['plugin'] as $item ) { 1104 $body_message = ''; 1105 $item_url = ''; 1106 1107 if ( ! empty( $item->item->url ) ) { 1108 $item_url = ' : ' . esc_url( $item->item->url ); 1109 } 1110 1104 1111 if ( $item->item->current_version ) { 1105 $body []= sprintf(1106 /* translators: 1: Plugin name, 2: Current version number, 3: New version number . */1107 __( '- %1$s (from version %2$s to %3$s) ' ),1112 $body_message .= sprintf( 1113 /* translators: 1: Plugin name, 2: Current version number, 3: New version number, 4: Plugin URL. */ 1114 __( '- %1$s (from version %2$s to %3$s)%4$s' ), 1108 1115 $item->name, 1109 1116 $item->item->current_version, 1110 $item->item->new_version 1117 $item->item->new_version, 1118 $item_url 1111 1119 ); 1112 1120 } else { 1113 $body []= sprintf(1114 /* translators: 1: Plugin name, 2: Version number . */1115 __( '- %1$s version %2$s ' ),1121 $body_message .= sprintf( 1122 /* translators: 1: Plugin name, 2: Version number, 3: Plugin URL. */ 1123 __( '- %1$s version %2$s%3$s' ), 1116 1124 $item->name, 1117 $item->item->new_version 1125 $item->item->new_version, 1126 $item_url 1118 1127 ); 1119 1128 } 1129 1130 $body[] = $body_message; 1120 1131 1121 1132 $past_failure_emails[ $item->item->plugin ] = $item->item->new_version; … … 1163 1174 1164 1175 foreach ( $successful_updates['plugin'] as $item ) { 1176 $body_message = ''; 1177 $item_url = ''; 1178 1179 if ( ! empty( $item->item->url ) ) { 1180 $item_url = ' : ' . esc_url( $item->item->url ); 1181 } 1182 1165 1183 if ( $item->item->current_version ) { 1166 $body []= sprintf(1167 /* translators: 1: Plugin name, 2: Current version number, 3: New version number . */1168 __( '- %1$s (from version %2$s to %3$s) ' ),1184 $body_message .= sprintf( 1185 /* translators: 1: Plugin name, 2: Current version number, 3: New version number, 4: Plugin URL. */ 1186 __( '- %1$s (from version %2$s to %3$s)%4$s' ), 1169 1187 $item->name, 1170 1188 $item->item->current_version, 1171 $item->item->new_version 1189 $item->item->new_version, 1190 $item_url 1172 1191 ); 1173 1192 } else { 1174 $body []= sprintf(1175 /* translators: 1: Plugin name, 2: Version number . */1176 __( '- %1$s version %2$s ' ),1193 $body_message .= sprintf( 1194 /* translators: 1: Plugin name, 2: Version number, 3: Plugin URL. */ 1195 __( '- %1$s version %2$s%3$s' ), 1177 1196 $item->name, 1178 $item->item->new_version 1197 $item->item->new_version, 1198 $item_url 1179 1199 ); 1180 1200 } 1201 $body[] = $body_message; 1181 1202 1182 1203 unset( $past_failure_emails[ $item->item->plugin ] );
Note: See TracChangeset
for help on using the changeset viewer.