Changeset 2290022
- Timestamp:
- 04/23/2020 10:41:37 AM (6 years ago)
- Location:
- coronavirus/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
coronavirus.php (modified) (2 diffs)
-
includes/class-coronavirus-shared-functionality.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
coronavirus/trunk/README.txt
r2285634 r2290022 55 55 == Changelog == 56 56 57 = 1.3.5 = 58 * Changed to different API endpoint to fix the issue of empty widgets. 59 57 60 = 1.3.4 = 58 61 * Updated the API to the v2 endpoint. All data should now be displayed again. -
coronavirus/trunk/coronavirus.php
r2285634 r2290022 17 17 * Plugin URI: https://github.com/VoHoTv/coronavirus 18 18 * Description: Display data about the coronavirus. 19 * Version: 1.3. 419 * Version: 1.3.5 20 20 * Author: Mike Zuidhoek 21 21 * Author URI: https://mikezuidhoek.com/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'CORONAVIRUS_VERSION', '1.3. 4' );38 define( 'CORONAVIRUS_VERSION', '1.3.5' ); 39 39 40 40 /** -
coronavirus/trunk/includes/class-coronavirus-shared-functionality.php
r2285634 r2290022 36 36 37 37 // // If country attribute is omitted display global data. 38 $url = empty($country) ? "https:// corona.lmao.ninja/v2/all" : "https://corona.lmao.ninja/v2/countries/$country_slug?strict=true";38 $url = empty($country) ? "https://ev3klr6bchdcdowp.disease.sh/v2/all" : "https://ev3klr6bchdcdowp.disease.sh/v2/countries/$country_slug"; 39 39 40 $response = wp_remote_get( $url ); 40 // Add unique user agent, requested by the COVID API team. 41 $response = wp_remote_get( $url, array( 42 'user-agent' => 'Coronavirus/1.0.0' 43 )); 44 41 45 $body = json_decode(wp_remote_retrieve_body( $response )); 42 46
Note: See TracChangeset
for help on using the changeset viewer.