Changeset 13603 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/inc/locales.php
- Timestamp:
- 04/29/2024 03:07:46 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/inc/locales.php
r10631 r13603 261 261 $counts = $percentages = []; 262 262 foreach ( $projects as $project ) { 263 $results = json_decode( file_get_contents( 'https://translate.wordpress.org/api/projects/' . $project ) ); 263 $results = json_decode( wp_remote_retrieve_body( wp_safe_remote_get( 'https://translate.wordpress.org/api/projects/' . $project ) ) ); 264 if ( ! $results ) { 265 continue; 266 } 267 264 268 foreach ( $results->translation_sets as $set ) { 265 269 … … 294 298 } 295 299 296 set_transient( 'core_translation_data', $percentages, 900);300 set_transient( 'core_translation_data', $percentages, 30 * MINUTE_IN_SECONDS ); 297 301 298 302 return $percentages;
Note: See TracChangeset
for help on using the changeset viewer.