Awesome Weather Widget - Version 1.0.1

Version Description

Changed API endpoints. Might not find weather without update.

=

Download this release

Release Info

Developer halgatewood
Plugin Icon 128x128 Awesome Weather Widget
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0 to 1.0.1

Files changed (2) hide show
  1. awesome-weather.php +3 -4
  2. readme.txt +8 -0
awesome-weather.php CHANGED
@@ -87,8 +87,7 @@ function awesome_weather_logic( $atts )
87
  set_transient( $city_id_transient_name, $city_id, 2629743); // CACHE FOR A MONTH
88
  }
89
  }
90
-
91
- echo $city_id;
92
 
93
  // NO CITY ID
94
  if( !$city_id ) { return awesome_weather_error( __('City could not be found', 'awesome-weather') ); }
@@ -101,13 +100,13 @@ function awesome_weather_logic( $atts )
101
 
102
  if(!isset($weather_data['today']))
103
  {
104
- $weather_data['today'] = json_decode(file_get_contents("http://api.openweathermap.org/data/2.3/weather/city/" . $city_id . "?units=" . $units) );
105
  set_transient( $weather_transient_name, $weather_data, apply_filters( 'awesome_weather_cache', 3600 ) ); // CACHE FOR AN HOUR
106
  }
107
 
108
  if(!isset($weather_data['forecast']) AND $days_to_show != "hide")
109
  {
110
- $weather_data['forecast'] = json_decode(file_get_contents("http://api.openweathermap.org/data/2.3/forecast/city/" . $city_id . "?mode=daily_compact&units=" . $units) );
111
  set_transient( $weather_transient_name, $weather_data, apply_filters( 'awesome_weather_cache', 3600 ) ); // CACHE FOR AN HOUR
112
  }
113
 
87
  set_transient( $city_id_transient_name, $city_id, 2629743); // CACHE FOR A MONTH
88
  }
89
  }
90
+
 
91
 
92
  // NO CITY ID
93
  if( !$city_id ) { return awesome_weather_error( __('City could not be found', 'awesome-weather') ); }
100
 
101
  if(!isset($weather_data['today']))
102
  {
103
+ $weather_data['today'] = json_decode(file_get_contents("http://api.openweathermap.org/data/2.1/weather/city/" . $city_id . "?units=" . $units) );
104
  set_transient( $weather_transient_name, $weather_data, apply_filters( 'awesome_weather_cache', 3600 ) ); // CACHE FOR AN HOUR
105
  }
106
 
107
  if(!isset($weather_data['forecast']) AND $days_to_show != "hide")
108
  {
109
+ $weather_data['forecast'] = json_decode(file_get_contents("http://api.openweathermap.org/data/2.1/forecast/city/" . $city_id . "?mode=daily_compact&units=" . $units) );
110
  set_transient( $weather_transient_name, $weather_data, apply_filters( 'awesome_weather_cache', 3600 ) ); // CACHE FOR AN HOUR
111
  }
112
 
readme.txt CHANGED
@@ -44,7 +44,15 @@ All weather data is provided by http://openweathermap.org and is cached for one
44
  3. Micro no features
45
  4. Widget Settings
46
 
 
 
 
 
 
47
  == Changelog ==
48
 
 
 
 
49
  = 1.0 =
50
  * Initial load of the plugin.
44
  3. Micro no features
45
  4. Widget Settings
46
 
47
+ == Upgrade Notice ==
48
+
49
+ = 1.0.1 =
50
+ Changed API endpoints. Might not find weather without update.
51
+
52
  == Changelog ==
53
 
54
+ = 1.0.1 =
55
+ * Changed API endpoints
56
+
57
  = 1.0 =
58
  * Initial load of the plugin.