Awesome Weather Widget - Version 1.3.1

Version Description

Added setting for color override Added URL param to clear transient cache '?clear_awesome_widget' Added new translations for the days of the week in the extended forecast Ability to add inline styles to the widget shortcode

Download this release

Release Info

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

Code changes from version 1.3 to 1.3.1

awesome-weather.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://halgatewood.com/awesome-weather
5
  Description: A weather widget that actually looks cool
6
  Author: Hal Gatewood
7
  Author URI: http://www.halgatewood.com
8
- Version: 1.3
9
 
10
 
11
  FILTERS AVAILABLE:
@@ -15,6 +15,11 @@ awesome_weather_sizes = array of sizes for widget
15
  awesome_weather_extended_forecast_text = Change text of footer link
16
 
17
 
 
 
 
 
 
18
  SHORTCODE USAGE
19
  [awesome-weather location="Oklahoma City, OK" units="F"]
20
  [awesome-weather location="London, UK" units="C" width=220]
@@ -67,6 +72,8 @@ function awesome_weather_logic( $atts )
67
  $show_stats = (isset($atts['hide_stats']) AND $atts['hide_stats'] == 1) ? 0 : 1;
68
  $show_link = (isset($atts['show_link']) AND $atts['show_link'] == 1) ? 1 : 0;
69
  $background = isset($atts['background']) ? $atts['background'] : false;
 
 
70
  $locale = 'en';
71
 
72
  $sytem_locale = get_locale();
@@ -86,6 +93,7 @@ function awesome_weather_logic( $atts )
86
  }
87
 
88
 
 
89
  // NO LOCATION, ABORT ABORT!!!1!
90
  if( !$location ) { return awesome_weather_error(); }
91
 
@@ -99,7 +107,13 @@ function awesome_weather_logic( $atts )
99
  //http://api.openweathermap.org/data/2.5/weather?q=London,uk&units=metric&cnt=7&lang=fr
100
  //http://api.openweathermap.org/data/2.5/forecast/daily?q=London&units=metric&cnt=7&lang=fr
101
 
102
-
 
 
 
 
 
 
103
 
104
  // GET WEATHER DATA
105
  if( get_transient( $weather_transient_name ) )
@@ -108,6 +122,9 @@ function awesome_weather_logic( $atts )
108
  }
109
  else
110
  {
 
 
 
111
  // NOW
112
  $now_ping = "http://api.openweathermap.org/data/2.5/weather?q=" . $city_name_slug . "&lang=" . $locale . "&units=" . $units;
113
  $now_ping_get = wp_remote_get( $now_ping );
@@ -152,8 +169,7 @@ function awesome_weather_logic( $atts )
152
  }
153
  }
154
 
155
-
156
- if($weather_data['now'] AND $weather_data['forecast'])
157
  {
158
  // SET THE TRANSIENT, CACHE FOR AN HOUR
159
  set_transient( $weather_transient_name, $weather_data, apply_filters( 'awesome_weather_cache', 3600 ) );
@@ -172,29 +188,36 @@ function awesome_weather_logic( $atts )
172
  $today_high = round($today->main->temp_max);
173
  $today_low = round($today->main->temp_min);
174
 
175
-
176
- // COLOR OF WIDGET
177
- $bg_color = "temp1";
178
- if($units_display == "F")
179
  {
180
- if($today_temp > 31 AND $today_temp < 40) $bg_color = "temp2";
181
- if($today_temp >= 40 AND $today_temp < 50) $bg_color = "temp3";
182
- if($today_temp >= 50 AND $today_temp < 60) $bg_color = "temp4";
183
- if($today_temp >= 60 AND $today_temp < 80) $bg_color = "temp5";
184
- if($today_temp >= 80 AND $today_temp < 90) $bg_color = "temp6";
185
- if($today_temp >= 90) $bg_color = "temp7";
186
  }
187
  else
188
  {
189
- if($today_temp > 1 AND $today_temp < 4) $bg_color = "temp2";
190
- if($today_temp >= 4 AND $today_temp < 10) $bg_color = "temp3";
191
- if($today_temp >= 10 AND $today_temp < 15) $bg_color = "temp4";
192
- if($today_temp >= 15 AND $today_temp < 26) $bg_color = "temp5";
193
- if($today_temp >= 26 AND $today_temp < 32) $bg_color = "temp6";
194
- if($today_temp >= 32) $bg_color = "temp7";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  }
196
-
197
-
198
  // DATA
199
  $header_title = $override_title ? $override_title : $today->name;
200
 
@@ -226,10 +249,15 @@ function awesome_weather_logic( $atts )
226
 
227
  if($background) $bg_color = "darken";
228
 
 
 
 
 
 
229
  // DISPLAY WIDGET
230
  $rtn .= "
231
 
232
- <div id=\"awesome-weather-{$city_name_slug}\" class=\"awesome-weather-wrap awecf {$bg_color} {$show_stats_class} awe_{$size}\">
233
  ";
234
 
235
 
@@ -274,9 +302,10 @@ function awesome_weather_logic( $atts )
274
  foreach( (array) $forecast->list as $forecast )
275
  {
276
  if( $dt_today >= date('Ymd', $forecast->dt)) continue;
 
277
 
278
  $forecast->temp = (int) $forecast->temp->day;
279
- $day_of_week = date('D', $forecast->dt);
280
  $rtn .= "
281
  <div class=\"awesome-weather-forecast-day\">
282
  <div class=\"awesome-weather-forecast-day-temp\">{$forecast->temp}<sup>{$units_display}</sup></div>
@@ -304,7 +333,6 @@ function awesome_weather_logic( $atts )
304
  $rtn .= "</div> <!-- /.awesome-weather-darken -->";
305
  }
306
 
307
-
308
  $rtn .= "</div> <!-- /.awesome-weather-wrap -->";
309
  return $rtn;
310
  }
@@ -336,9 +364,10 @@ class AwesomeWeatherWidget extends WP_Widget
336
  $hide_stats = (isset($instance['hide_stats']) AND $instance['hide_stats'] == 1) ? 1 : 0;
337
  $show_link = (isset($instance['show_link']) AND $instance['show_link'] == 1) ? 1 : 0;
338
  $background = isset($instance['background']) ? $instance['background'] : false;
 
339
 
340
  echo $before_widget;
341
- echo awesome_weather_logic( array( 'location' => $location, 'override_title' => $override_title, 'size' => $size, 'units' => $units, 'forecast_days' => $forecast_days, 'hide_stats' => $hide_stats, 'show_link' => $show_link, 'background' => $background ));
342
  echo $after_widget;
343
  }
344
 
@@ -353,6 +382,7 @@ class AwesomeWeatherWidget extends WP_Widget
353
  $instance['hide_stats'] = strip_tags($new_instance['hide_stats']);
354
  $instance['show_link'] = strip_tags($new_instance['show_link']);
355
  $instance['background'] = strip_tags($new_instance['background']);
 
356
  return $instance;
357
  }
358
 
@@ -368,6 +398,7 @@ class AwesomeWeatherWidget extends WP_Widget
368
  $hide_stats = (isset($instance['hide_stats']) AND $instance['hide_stats'] == 1) ? 1 : 0;
369
  $show_link = (isset($instance['show_link']) AND $instance['show_link'] == 1) ? 1 : 0;
370
  $background = isset($instance['background']) ? esc_attr($instance['background']) : "";
 
371
  ?>
372
  <p>
373
  <label for="<?php echo $this->get_field_id('location'); ?>">
@@ -413,6 +444,12 @@ class AwesomeWeatherWidget extends WP_Widget
413
  <label for="<?php echo $this->get_field_id('background'); ?>"><?php _e('Background Image:', 'awesome-weather'); ?></label>
414
  <input class="widefat" id="<?php echo $this->get_field_id('background'); ?>" name="<?php echo $this->get_field_name('background'); ?>" type="text" value="<?php echo $background; ?>" />
415
  </p>
 
 
 
 
 
 
416
 
417
  <p>
418
  <label for="<?php echo $this->get_field_id('hide_stats'); ?>"><?php _e('Hide Stats:', 'awesome-weather'); ?></label> &nbsp;
@@ -423,13 +460,9 @@ class AwesomeWeatherWidget extends WP_Widget
423
  <label for="<?php echo $this->get_field_id('show_link'); ?>"><?php _e('Link to OpenWeatherMap:', 'awesome-weather'); ?></label> &nbsp;
424
  <input id="<?php echo $this->get_field_id('show_link'); ?>" name="<?php echo $this->get_field_name('show_link'); ?>" type="checkbox" value="1" <?php if($show_link) echo ' checked="checked"'; ?> />
425
  </p>
426
-
427
 
428
  <?php
429
  }
430
  }
431
 
432
- add_action( 'widgets_init', create_function('', 'return register_widget("AwesomeWeatherWidget");') );
433
-
434
-
435
-
5
  Description: A weather widget that actually looks cool
6
  Author: Hal Gatewood
7
  Author URI: http://www.halgatewood.com
8
+ Version: 1.3.1
9
 
10
 
11
  FILTERS AVAILABLE:
15
  awesome_weather_extended_forecast_text = Change text of footer link
16
 
17
 
18
+ // CLEAR OUT THE TRANSIENT CACHE
19
+ add to your URL 'clear_awesome_widget'
20
+ For example: http://url.com/?clear_awesome_widget
21
+
22
+
23
  SHORTCODE USAGE
24
  [awesome-weather location="Oklahoma City, OK" units="F"]
25
  [awesome-weather location="London, UK" units="C" width=220]
72
  $show_stats = (isset($atts['hide_stats']) AND $atts['hide_stats'] == 1) ? 0 : 1;
73
  $show_link = (isset($atts['show_link']) AND $atts['show_link'] == 1) ? 1 : 0;
74
  $background = isset($atts['background']) ? $atts['background'] : false;
75
+ $custom_bg_color = isset($atts['custom_bg_color']) ? $atts['custom_bg_color'] : false;
76
+ $inline_style = isset($atts['inline_style']) ? $atts['inline_style'] : '';
77
  $locale = 'en';
78
 
79
  $sytem_locale = get_locale();
93
  }
94
 
95
 
96
+
97
  // NO LOCATION, ABORT ABORT!!!1!
98
  if( !$location ) { return awesome_weather_error(); }
99
 
107
  //http://api.openweathermap.org/data/2.5/weather?q=London,uk&units=metric&cnt=7&lang=fr
108
  //http://api.openweathermap.org/data/2.5/forecast/daily?q=London&units=metric&cnt=7&lang=fr
109
 
110
+
111
+ // CLEAR THE TRANSIENT
112
+ if( isset($_GET['clear_awesome_widget']) )
113
+ {
114
+ delete_transient( $weather_transient_name );
115
+ }
116
+
117
 
118
  // GET WEATHER DATA
119
  if( get_transient( $weather_transient_name ) )
122
  }
123
  else
124
  {
125
+ $weather_data['now'] = array();
126
+ $weather_data['forecast'] = array();
127
+
128
  // NOW
129
  $now_ping = "http://api.openweathermap.org/data/2.5/weather?q=" . $city_name_slug . "&lang=" . $locale . "&units=" . $units;
130
  $now_ping_get = wp_remote_get( $now_ping );
169
  }
170
  }
171
 
172
+ if($weather_data['now'] OR $weather_data['forecast'])
 
173
  {
174
  // SET THE TRANSIENT, CACHE FOR AN HOUR
175
  set_transient( $weather_transient_name, $weather_data, apply_filters( 'awesome_weather_cache', 3600 ) );
188
  $today_high = round($today->main->temp_max);
189
  $today_low = round($today->main->temp_min);
190
 
191
+ if( $custom_bg_color )
 
 
 
192
  {
193
+ if( substr(trim($custom_bg_color), 0, 1) != "#" ) { $custom_bg_color = "#" . $custom_bg_color; }
194
+ $inline_style .= "background-color: {$custom_bg_color};";
195
+ $bg_color = "custom";
 
 
 
196
  }
197
  else
198
  {
199
+ // COLOR OF WIDGET
200
+ $bg_color = "temp1";
201
+ if($units_display == "F")
202
+ {
203
+ if($today_temp > 31 AND $today_temp < 40) $bg_color = "temp2";
204
+ if($today_temp >= 40 AND $today_temp < 50) $bg_color = "temp3";
205
+ if($today_temp >= 50 AND $today_temp < 60) $bg_color = "temp4";
206
+ if($today_temp >= 60 AND $today_temp < 80) $bg_color = "temp5";
207
+ if($today_temp >= 80 AND $today_temp < 90) $bg_color = "temp6";
208
+ if($today_temp >= 90) $bg_color = "temp7";
209
+ }
210
+ else
211
+ {
212
+ if($today_temp > 1 AND $today_temp < 4) $bg_color = "temp2";
213
+ if($today_temp >= 4 AND $today_temp < 10) $bg_color = "temp3";
214
+ if($today_temp >= 10 AND $today_temp < 15) $bg_color = "temp4";
215
+ if($today_temp >= 15 AND $today_temp < 26) $bg_color = "temp5";
216
+ if($today_temp >= 26 AND $today_temp < 32) $bg_color = "temp6";
217
+ if($today_temp >= 32) $bg_color = "temp7";
218
+ }
219
  }
220
+
 
221
  // DATA
222
  $header_title = $override_title ? $override_title : $today->name;
223
 
249
 
250
  if($background) $bg_color = "darken";
251
 
252
+ if($inline_style != "")
253
+ {
254
+ $inline_style = " style=\"{$inline_style}\"";
255
+ }
256
+
257
  // DISPLAY WIDGET
258
  $rtn .= "
259
 
260
+ <div id=\"awesome-weather-{$city_name_slug}\" class=\"awesome-weather-wrap awecf {$bg_color} {$show_stats_class} awe_{$size}\"{$inline_style}>
261
  ";
262
 
263
 
302
  foreach( (array) $forecast->list as $forecast )
303
  {
304
  if( $dt_today >= date('Ymd', $forecast->dt)) continue;
305
+ $days_of_week = array( __('Sun' ,'awesome-weather'), __('Mon' ,'awesome-weather'), __('Tue' ,'awesome-weather'), __('Wed' ,'awesome-weather'), __('Thu' ,'awesome-weather'), __('Fri' ,'awesome-weather'), __('Sat' ,'awesome-weather') );
306
 
307
  $forecast->temp = (int) $forecast->temp->day;
308
+ $day_of_week = $days_of_week[ date('w', $forecast->dt) ];
309
  $rtn .= "
310
  <div class=\"awesome-weather-forecast-day\">
311
  <div class=\"awesome-weather-forecast-day-temp\">{$forecast->temp}<sup>{$units_display}</sup></div>
333
  $rtn .= "</div> <!-- /.awesome-weather-darken -->";
334
  }
335
 
 
336
  $rtn .= "</div> <!-- /.awesome-weather-wrap -->";
337
  return $rtn;
338
  }
364
  $hide_stats = (isset($instance['hide_stats']) AND $instance['hide_stats'] == 1) ? 1 : 0;
365
  $show_link = (isset($instance['show_link']) AND $instance['show_link'] == 1) ? 1 : 0;
366
  $background = isset($instance['background']) ? $instance['background'] : false;
367
+ $custom_bg_color = isset($instance['custom_bg_color']) ? $instance['custom_bg_color'] : false;
368
 
369
  echo $before_widget;
370
+ echo awesome_weather_logic( array( 'location' => $location, 'override_title' => $override_title, 'size' => $size, 'units' => $units, 'forecast_days' => $forecast_days, 'hide_stats' => $hide_stats, 'show_link' => $show_link, 'background' => $background, 'custom_bg_color' => $custom_bg_color ));
371
  echo $after_widget;
372
  }
373
 
382
  $instance['hide_stats'] = strip_tags($new_instance['hide_stats']);
383
  $instance['show_link'] = strip_tags($new_instance['show_link']);
384
  $instance['background'] = strip_tags($new_instance['background']);
385
+ $instance['custom_bg_color'] = strip_tags($new_instance['custom_bg_color']);
386
  return $instance;
387
  }
388
 
398
  $hide_stats = (isset($instance['hide_stats']) AND $instance['hide_stats'] == 1) ? 1 : 0;
399
  $show_link = (isset($instance['show_link']) AND $instance['show_link'] == 1) ? 1 : 0;
400
  $background = isset($instance['background']) ? esc_attr($instance['background']) : "";
401
+ $custom_bg_color = isset($instance['custom_bg_color']) ? esc_attr($instance['custom_bg_color']) : "";
402
  ?>
403
  <p>
404
  <label for="<?php echo $this->get_field_id('location'); ?>">
444
  <label for="<?php echo $this->get_field_id('background'); ?>"><?php _e('Background Image:', 'awesome-weather'); ?></label>
445
  <input class="widefat" id="<?php echo $this->get_field_id('background'); ?>" name="<?php echo $this->get_field_name('background'); ?>" type="text" value="<?php echo $background; ?>" />
446
  </p>
447
+
448
+ <p>
449
+ <label for="<?php echo $this->get_field_id('custom_bg_color'); ?>"><?php _e('Custom Background Color:', 'awesome-weather'); ?></label><br />
450
+ <small><?php _e('(overrides color changing, use hex #7fb761)', 'awesome-weather'); ?></small>
451
+ <input class="widefat" id="<?php echo $this->get_field_id('custom_bg_color'); ?>" name="<?php echo $this->get_field_name('custom_bg_color'); ?>" type="text" value="<?php echo $custom_bg_color; ?>" />
452
+ </p>
453
 
454
  <p>
455
  <label for="<?php echo $this->get_field_id('hide_stats'); ?>"><?php _e('Hide Stats:', 'awesome-weather'); ?></label> &nbsp;
460
  <label for="<?php echo $this->get_field_id('show_link'); ?>"><?php _e('Link to OpenWeatherMap:', 'awesome-weather'); ?></label> &nbsp;
461
  <input id="<?php echo $this->get_field_id('show_link'); ?>" name="<?php echo $this->get_field_name('show_link'); ?>" type="checkbox" value="1" <?php if($show_link) echo ' checked="checked"'; ?> />
462
  </p>
 
463
 
464
  <?php
465
  }
466
  }
467
 
468
+ add_action( 'widgets_init', create_function('', 'return register_widget("AwesomeWeatherWidget");') );
 
 
 
languages/awesome-weather-pl_PL.pot ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Awesome Weather Widget
2
+ # This file is distributed under the same license as the Awesome Weather Widget package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Awesome Weather Widget 1.3\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/awesome-weather\n"
7
+ "POT-Creation-Date: 2013-07-23 18:07:09+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-08-08 08:30+0100\n"
12
+ "Last-Translator: Hal Gatewood <hal@halgatewood.com>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "X-Generator: Poedit 1.5.7\n"
15
+
16
+ #: awesome-weather.php:64
17
+ msgid "C"
18
+ msgstr ""
19
+
20
+ #: awesome-weather.php:64
21
+ msgid "F"
22
+ msgstr ""
23
+
24
+ #: awesome-weather.php:205
25
+ msgid "N"
26
+ msgstr ""
27
+
28
+ #: awesome-weather.php:206
29
+ msgid "NNE"
30
+ msgstr ""
31
+
32
+ #: awesome-weather.php:207
33
+ msgid "NE"
34
+ msgstr ""
35
+
36
+ #: awesome-weather.php:208
37
+ msgid "ENE"
38
+ msgstr ""
39
+
40
+ #: awesome-weather.php:209
41
+ msgid "E"
42
+ msgstr ""
43
+
44
+ #: awesome-weather.php:210
45
+ msgid "ESE"
46
+ msgstr ""
47
+
48
+ #: awesome-weather.php:211
49
+ msgid "SE"
50
+ msgstr ""
51
+
52
+ #: awesome-weather.php:212
53
+ msgid "SSE"
54
+ msgstr ""
55
+
56
+ #: awesome-weather.php:213
57
+ msgid "S"
58
+ msgstr ""
59
+
60
+ #: awesome-weather.php:214
61
+ msgid "SSW"
62
+ msgstr ""
63
+
64
+ #: awesome-weather.php:215
65
+ msgid "SW"
66
+ msgstr ""
67
+
68
+ #: awesome-weather.php:216
69
+ msgid "WSW"
70
+ msgstr ""
71
+
72
+ #: awesome-weather.php:217
73
+ msgid "W"
74
+ msgstr ""
75
+
76
+ #: awesome-weather.php:218
77
+ msgid "WNW"
78
+ msgstr ""
79
+
80
+ #: awesome-weather.php:219
81
+ msgid "NW"
82
+ msgstr ""
83
+
84
+ #: awesome-weather.php:220
85
+ msgid "NNW"
86
+ msgstr ""
87
+
88
+ #: awesome-weather.php:252
89
+ msgid "km/h"
90
+ msgstr ""
91
+
92
+ #: awesome-weather.php:252
93
+ msgid "mph"
94
+ msgstr ""
95
+
96
+ #: awesome-weather.php:259
97
+ msgid "humidity:"
98
+ msgstr "wilgotność:"
99
+
100
+ #: awesome-weather.php:260
101
+ msgid "wind:"
102
+ msgstr "wiatr:"
103
+
104
+ #: awesome-weather.php:261
105
+ msgid "H"
106
+ msgstr ""
107
+
108
+ #: awesome-weather.php:261
109
+ msgid "L"
110
+ msgstr ""
111
+
112
+ #: awesome-weather.php:294
113
+ msgid "extended forecast"
114
+ msgstr "rozszerzona prognoza"
115
+
116
+ #: awesome-weather.php:316
117
+ msgid "No weather information available"
118
+ msgstr "Brak danych"
119
+
120
+ #: awesome-weather.php:374
121
+ msgid "Location:"
122
+ msgstr "Lokalizacja:"
123
+
124
+ #: awesome-weather.php:375
125
+ msgid "(i.e: London,UK or New York City,NY)"
126
+ msgstr "(np. Warszawa, Wrocław, Kraków, itd.)"
127
+
128
+ #: awesome-weather.php:381
129
+ msgid "Override Title:"
130
+ msgstr "Tytuł zastępczy:"
131
+
132
+ #: awesome-weather.php:386
133
+ msgid "Units:"
134
+ msgstr "Jednostka:"
135
+
136
+ #: awesome-weather.php:392
137
+ msgid "Size:"
138
+ msgstr "Wielkość:"
139
+
140
+ #: awesome-weather.php:401
141
+ msgid "Forecast:"
142
+ msgstr "Prognoza:"
143
+
144
+ #: awesome-weather.php:413
145
+ msgid "Background Image:"
146
+ msgstr "Tło:"
147
+
148
+ #: awesome-weather.php:418
149
+ msgid "Hide Stats:"
150
+ msgstr "Ukryj statystyki:"
151
+
152
+ #: awesome-weather.php:423
153
+ msgid "Link to OpenWeatherMap:"
154
+ msgstr "Link do OpenWeatherMap:"
155
+
156
+ #. Plugin Name of the plugin/theme
157
+ msgid "Awesome Weather Widget"
158
+ msgstr ""
159
+
160
+ #. Plugin URI of the plugin/theme
161
+ msgid "http://halgatewood.com/awesome-weather"
162
+ msgstr ""
163
+
164
+ #. Description of the plugin/theme
165
+ msgid "A weather widget that actually looks cool"
166
+ msgstr "Najładniejszy widget pogody"
167
+
168
+ #. Author of the plugin/theme
169
+ msgid "Hal Gatewood"
170
+ msgstr ""
171
+
172
+ #. Author URI of the plugin/theme
173
+ msgid "http://www.halgatewood.com"
174
+ msgstr ""
languages/awesome-weather-pt_PT.mo ADDED
Binary file
languages/awesome-weather-pt_PT.po ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Awesome Weather Widget
2
+ # This file is distributed under the same license as the Awesome Weather Widget package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Awesome Weather Widget 1.3.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/awesome-weather\n"
7
+ "POT-Creation-Date: 2013-09-27 16:36:26+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-10-16 11:42-0000\n"
12
+ "Last-Translator: Alvaro Gois dos Santos <alvarogois@ovni.org>\n"
13
+ "Language-Team: OVNI <alvarogois@ovni.org>\n"
14
+ "X-Generator: Poedit 1.5.7\n"
15
+ "Language: pt_PT\n"
16
+
17
+ #: awesome-weather.php:69
18
+ msgid "C"
19
+ msgstr ""
20
+
21
+ #: awesome-weather.php:69
22
+ msgid "F"
23
+ msgstr ""
24
+
25
+ #: awesome-weather.php:228
26
+ msgid "N"
27
+ msgstr ""
28
+
29
+ #: awesome-weather.php:229
30
+ msgid "NNE"
31
+ msgstr ""
32
+
33
+ #: awesome-weather.php:230
34
+ msgid "NE"
35
+ msgstr ""
36
+
37
+ #: awesome-weather.php:231
38
+ msgid "ENE"
39
+ msgstr ""
40
+
41
+ #: awesome-weather.php:232
42
+ msgid "E"
43
+ msgstr ""
44
+
45
+ #: awesome-weather.php:233
46
+ msgid "ESE"
47
+ msgstr ""
48
+
49
+ #: awesome-weather.php:234
50
+ msgid "SE"
51
+ msgstr ""
52
+
53
+ #: awesome-weather.php:235
54
+ msgid "SSE"
55
+ msgstr ""
56
+
57
+ #: awesome-weather.php:236
58
+ msgid "S"
59
+ msgstr ""
60
+
61
+ #: awesome-weather.php:237
62
+ msgid "SSW"
63
+ msgstr ""
64
+
65
+ #: awesome-weather.php:238
66
+ msgid "SW"
67
+ msgstr ""
68
+
69
+ #: awesome-weather.php:239
70
+ msgid "WSW"
71
+ msgstr ""
72
+
73
+ #: awesome-weather.php:240
74
+ msgid "W"
75
+ msgstr ""
76
+
77
+ #: awesome-weather.php:241
78
+ msgid "WNW"
79
+ msgstr ""
80
+
81
+ #: awesome-weather.php:242
82
+ msgid "NW"
83
+ msgstr ""
84
+
85
+ #: awesome-weather.php:243
86
+ msgid "NNW"
87
+ msgstr ""
88
+
89
+ #: awesome-weather.php:280
90
+ msgid "km/h"
91
+ msgstr ""
92
+
93
+ #: awesome-weather.php:280
94
+ msgid "mph"
95
+ msgstr ""
96
+
97
+ #: awesome-weather.php:287
98
+ msgid "humidity:"
99
+ msgstr "humidade:"
100
+
101
+ #: awesome-weather.php:288
102
+ msgid "wind:"
103
+ msgstr "vento:"
104
+
105
+ #: awesome-weather.php:289
106
+ msgid "H"
107
+ msgstr "max"
108
+
109
+ #: awesome-weather.php:289
110
+ msgid "L"
111
+ msgstr "min"
112
+
113
+ #: awesome-weather.php:305
114
+ msgid "Sun"
115
+ msgstr "dom"
116
+
117
+ #: awesome-weather.php:305
118
+ msgid "Mon"
119
+ msgstr "seg"
120
+
121
+ #: awesome-weather.php:305
122
+ msgid "Tue"
123
+ msgstr "ter"
124
+
125
+ #: awesome-weather.php:305
126
+ msgid "Wed"
127
+ msgstr "qua"
128
+
129
+ #: awesome-weather.php:305
130
+ msgid "Thu"
131
+ msgstr "qui"
132
+
133
+ #: awesome-weather.php:305
134
+ msgid "Fri"
135
+ msgstr "sex"
136
+
137
+ #: awesome-weather.php:305
138
+ msgid "Sat"
139
+ msgstr "sab"
140
+
141
+ #: awesome-weather.php:323
142
+ msgid "extended forecast"
143
+ msgstr "previsão longa"
144
+
145
+ #: awesome-weather.php:344
146
+ msgid "No weather information available"
147
+ msgstr "Informação indisponível!"
148
+
149
+ #: awesome-weather.php:405
150
+ msgid "Location:"
151
+ msgstr "Local:"
152
+
153
+ #: awesome-weather.php:406
154
+ msgid "(i.e: London,UK or New York City,NY)"
155
+ msgstr "(p.e., Lisboa,PT ou London,UK)"
156
+
157
+ #: awesome-weather.php:412
158
+ msgid "Override Title:"
159
+ msgstr "Substituir o título por:"
160
+
161
+ #: awesome-weather.php:417
162
+ msgid "Units:"
163
+ msgstr "Unidades:"
164
+
165
+ #: awesome-weather.php:423
166
+ msgid "Size:"
167
+ msgstr "Tamanho:"
168
+
169
+ #: awesome-weather.php:432
170
+ msgid "Forecast:"
171
+ msgstr "Previsão:"
172
+
173
+ #: awesome-weather.php:444
174
+ msgid "Background Image:"
175
+ msgstr "Imagem de fundo:"
176
+
177
+ #: awesome-weather.php:449
178
+ msgid "Custom Background Color:"
179
+ msgstr "Cor de fundo personalizada:"
180
+
181
+ #: awesome-weather.php:450
182
+ msgid "(overrides color changing, use hex #7fb761)"
183
+ msgstr "(substitui a mudança de cores, use hex #7fb761)"
184
+
185
+ #: awesome-weather.php:455
186
+ msgid "Hide Stats:"
187
+ msgstr "Ocultar dados:"
188
+
189
+ #: awesome-weather.php:460
190
+ msgid "Link to OpenWeatherMap:"
191
+ msgstr "Link para OpenWeatherMap:"
192
+
193
+ #. Plugin Name of the plugin/theme
194
+ msgid "Awesome Weather Widget"
195
+ msgstr "Awesome Weather Widget"
196
+
197
+ #. Plugin URI of the plugin/theme
198
+ msgid "http://halgatewood.com/awesome-weather"
199
+ msgstr "http://halgatewood.com/awesome-weather"
200
+
201
+ #. Description of the plugin/theme
202
+ msgid "A weather widget that actually looks cool"
203
+ msgstr "Um widget em que o tempo parece sempre bom"
204
+
205
+ #. Author of the plugin/theme
206
+ msgid "Hal Gatewood"
207
+ msgstr "Hal Gatewood"
208
+
209
+ #. Author URI of the plugin/theme
210
+ msgid "http://www.halgatewood.com"
211
+ msgstr "http://www.halgatewood.com"
languages/awesome-weather.pot CHANGED
@@ -2,156 +2,191 @@
2
  # This file is distributed under the same license as the Awesome Weather Widget package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Awesome Weather Widget 1.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/awesome-weather\n"
7
- "POT-Creation-Date: 2013-07-23 18:07:09+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2013-07-23 13:08-0600\n"
12
- "Last-Translator: Hal Gatewood <hal@halgatewood.com>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: awesome-weather.php:64
16
  msgid "C"
17
  msgstr ""
18
 
19
- #: awesome-weather.php:64
20
  msgid "F"
21
  msgstr ""
22
 
23
- #: awesome-weather.php:205
24
  msgid "N"
25
  msgstr ""
26
 
27
- #: awesome-weather.php:206
28
  msgid "NNE"
29
  msgstr ""
30
 
31
- #: awesome-weather.php:207
32
  msgid "NE"
33
  msgstr ""
34
 
35
- #: awesome-weather.php:208
36
  msgid "ENE"
37
  msgstr ""
38
 
39
- #: awesome-weather.php:209
40
  msgid "E"
41
  msgstr ""
42
 
43
- #: awesome-weather.php:210
44
  msgid "ESE"
45
  msgstr ""
46
 
47
- #: awesome-weather.php:211
48
  msgid "SE"
49
  msgstr ""
50
 
51
- #: awesome-weather.php:212
52
  msgid "SSE"
53
  msgstr ""
54
 
55
- #: awesome-weather.php:213
56
  msgid "S"
57
  msgstr ""
58
 
59
- #: awesome-weather.php:214
60
  msgid "SSW"
61
  msgstr ""
62
 
63
- #: awesome-weather.php:215
64
  msgid "SW"
65
  msgstr ""
66
 
67
- #: awesome-weather.php:216
68
  msgid "WSW"
69
  msgstr ""
70
 
71
- #: awesome-weather.php:217
72
  msgid "W"
73
  msgstr ""
74
 
75
- #: awesome-weather.php:218
76
  msgid "WNW"
77
  msgstr ""
78
 
79
- #: awesome-weather.php:219
80
  msgid "NW"
81
  msgstr ""
82
 
83
- #: awesome-weather.php:220
84
  msgid "NNW"
85
  msgstr ""
86
 
87
- #: awesome-weather.php:252
88
  msgid "km/h"
89
  msgstr ""
90
 
91
- #: awesome-weather.php:252
92
  msgid "mph"
93
  msgstr ""
94
 
95
- #: awesome-weather.php:259
96
  msgid "humidity:"
97
  msgstr ""
98
 
99
- #: awesome-weather.php:260
100
  msgid "wind:"
101
  msgstr ""
102
 
103
- #: awesome-weather.php:261
104
  msgid "H"
105
  msgstr ""
106
 
107
- #: awesome-weather.php:261
108
  msgid "L"
109
  msgstr ""
110
 
111
- #: awesome-weather.php:294
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  msgid "extended forecast"
113
  msgstr ""
114
 
115
- #: awesome-weather.php:316
116
  msgid "No weather information available"
117
  msgstr ""
118
 
119
- #: awesome-weather.php:374
120
  msgid "Location:"
121
  msgstr ""
122
 
123
- #: awesome-weather.php:375
124
  msgid "(i.e: London,UK or New York City,NY)"
125
  msgstr ""
126
 
127
- #: awesome-weather.php:381
128
  msgid "Override Title:"
129
  msgstr ""
130
 
131
- #: awesome-weather.php:386
132
  msgid "Units:"
133
  msgstr ""
134
 
135
- #: awesome-weather.php:392
136
  msgid "Size:"
137
  msgstr ""
138
 
139
- #: awesome-weather.php:401
140
  msgid "Forecast:"
141
  msgstr ""
142
 
143
- #: awesome-weather.php:413
144
  msgid "Background Image:"
145
  msgstr ""
146
 
147
- #: awesome-weather.php:418
 
 
 
 
 
 
 
 
148
  msgid "Hide Stats:"
149
  msgstr ""
150
 
151
- #: awesome-weather.php:423
152
  msgid "Link to OpenWeatherMap:"
153
  msgstr ""
154
-
155
  #. Plugin Name of the plugin/theme
156
  msgid "Awesome Weather Widget"
157
  msgstr ""
@@ -171,4 +206,3 @@ msgstr ""
171
  #. Author URI of the plugin/theme
172
  msgid "http://www.halgatewood.com"
173
  msgstr ""
174
-
2
  # This file is distributed under the same license as the Awesome Weather Widget package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Awesome Weather Widget 1.3.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/awesome-weather\n"
7
+ "POT-Creation-Date: 2013-09-27 16:36:26+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: awesome-weather.php:69
16
  msgid "C"
17
  msgstr ""
18
 
19
+ #: awesome-weather.php:69
20
  msgid "F"
21
  msgstr ""
22
 
23
+ #: awesome-weather.php:228
24
  msgid "N"
25
  msgstr ""
26
 
27
+ #: awesome-weather.php:229
28
  msgid "NNE"
29
  msgstr ""
30
 
31
+ #: awesome-weather.php:230
32
  msgid "NE"
33
  msgstr ""
34
 
35
+ #: awesome-weather.php:231
36
  msgid "ENE"
37
  msgstr ""
38
 
39
+ #: awesome-weather.php:232
40
  msgid "E"
41
  msgstr ""
42
 
43
+ #: awesome-weather.php:233
44
  msgid "ESE"
45
  msgstr ""
46
 
47
+ #: awesome-weather.php:234
48
  msgid "SE"
49
  msgstr ""
50
 
51
+ #: awesome-weather.php:235
52
  msgid "SSE"
53
  msgstr ""
54
 
55
+ #: awesome-weather.php:236
56
  msgid "S"
57
  msgstr ""
58
 
59
+ #: awesome-weather.php:237
60
  msgid "SSW"
61
  msgstr ""
62
 
63
+ #: awesome-weather.php:238
64
  msgid "SW"
65
  msgstr ""
66
 
67
+ #: awesome-weather.php:239
68
  msgid "WSW"
69
  msgstr ""
70
 
71
+ #: awesome-weather.php:240
72
  msgid "W"
73
  msgstr ""
74
 
75
+ #: awesome-weather.php:241
76
  msgid "WNW"
77
  msgstr ""
78
 
79
+ #: awesome-weather.php:242
80
  msgid "NW"
81
  msgstr ""
82
 
83
+ #: awesome-weather.php:243
84
  msgid "NNW"
85
  msgstr ""
86
 
87
+ #: awesome-weather.php:280
88
  msgid "km/h"
89
  msgstr ""
90
 
91
+ #: awesome-weather.php:280
92
  msgid "mph"
93
  msgstr ""
94
 
95
+ #: awesome-weather.php:287
96
  msgid "humidity:"
97
  msgstr ""
98
 
99
+ #: awesome-weather.php:288
100
  msgid "wind:"
101
  msgstr ""
102
 
103
+ #: awesome-weather.php:289
104
  msgid "H"
105
  msgstr ""
106
 
107
+ #: awesome-weather.php:289
108
  msgid "L"
109
  msgstr ""
110
 
111
+ #: awesome-weather.php:305
112
+ msgid "Sun"
113
+ msgstr ""
114
+
115
+ #: awesome-weather.php:305
116
+ msgid "Mon"
117
+ msgstr ""
118
+
119
+ #: awesome-weather.php:305
120
+ msgid "Tue"
121
+ msgstr ""
122
+
123
+ #: awesome-weather.php:305
124
+ msgid "Wed"
125
+ msgstr ""
126
+
127
+ #: awesome-weather.php:305
128
+ msgid "Thu"
129
+ msgstr ""
130
+
131
+ #: awesome-weather.php:305
132
+ msgid "Fri"
133
+ msgstr ""
134
+
135
+ #: awesome-weather.php:305
136
+ msgid "Sat"
137
+ msgstr ""
138
+
139
+ #: awesome-weather.php:323
140
  msgid "extended forecast"
141
  msgstr ""
142
 
143
+ #: awesome-weather.php:344
144
  msgid "No weather information available"
145
  msgstr ""
146
 
147
+ #: awesome-weather.php:405
148
  msgid "Location:"
149
  msgstr ""
150
 
151
+ #: awesome-weather.php:406
152
  msgid "(i.e: London,UK or New York City,NY)"
153
  msgstr ""
154
 
155
+ #: awesome-weather.php:412
156
  msgid "Override Title:"
157
  msgstr ""
158
 
159
+ #: awesome-weather.php:417
160
  msgid "Units:"
161
  msgstr ""
162
 
163
+ #: awesome-weather.php:423
164
  msgid "Size:"
165
  msgstr ""
166
 
167
+ #: awesome-weather.php:432
168
  msgid "Forecast:"
169
  msgstr ""
170
 
171
+ #: awesome-weather.php:444
172
  msgid "Background Image:"
173
  msgstr ""
174
 
175
+ #: awesome-weather.php:449
176
+ msgid "Custom Background Color:"
177
+ msgstr ""
178
+
179
+ #: awesome-weather.php:450
180
+ msgid "(overrides color changing, use hex #7fb761)"
181
+ msgstr ""
182
+
183
+ #: awesome-weather.php:455
184
  msgid "Hide Stats:"
185
  msgstr ""
186
 
187
+ #: awesome-weather.php:460
188
  msgid "Link to OpenWeatherMap:"
189
  msgstr ""
 
190
  #. Plugin Name of the plugin/theme
191
  msgid "Awesome Weather Widget"
192
  msgstr ""
206
  #. Author URI of the plugin/theme
207
  msgid "http://www.halgatewood.com"
208
  msgstr ""
 
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Plugin Name ===
2
  Contributors: halgatewood
3
  Donate link: http://halgatewood.com/awesome-weather/
4
- Tags: widgets, sidebar, shortcode, openweathermap, weather, weather widget, forecast, global
5
  Requires at least: 3.5
6
  Tested up to: 3.6
7
  Stable tag: trunk
@@ -16,9 +16,9 @@ This plugin allows you to easily add super clean weather widgets to your site. T
16
 
17
  Use the built in widget or add it somewhere else with this shortcode: (all settings shown)
18
 
19
- `[awesome-weather location="Montreal" units="F" size="tall" override_title="MTL" forecast_days=2 hide_stats=true background=http://urltoanimage.jpg]`
20
 
21
- Settings:
22
 
23
  * Location: Enter like Montreal, CA or just Montreal. You may need to try different variations to get the right city
24
  * Units: F (default) or C
@@ -27,9 +27,14 @@ Settings:
27
  * Forecast Days: How many days to show in the forecast bar
28
  * Hide stats: Hide the text stats like humidity, wind, high and lows, etc
29
  * Background: URL to an image that will be used as the background of the entire widget
 
 
30
 
31
  All weather data is provided by http://openweathermap.org and is cached for one hour.
32
 
 
 
 
33
 
34
  == Installation ==
35
 
@@ -45,9 +50,16 @@ All weather data is provided by http://openweathermap.org and is cached for one
45
  3. Micro no features
46
  4. Widget Settings
47
  5. Background Image Option (1.2)
 
48
 
49
  == Upgrade Notice ==
50
 
 
 
 
 
 
 
51
  = 1.3 =
52
  Upgraded to most recent OpenWeatherMap APIS and included translation files.
53
 
@@ -80,6 +92,13 @@ Changed API endpoints. Might not find weather without update.
80
 
81
  == Changelog ==
82
 
 
 
 
 
 
 
 
83
  = 1.3 =
84
  * Upgraded to most recent OpenWeatherMap APIS
85
  * Ready for translations
1
  === Plugin Name ===
2
  Contributors: halgatewood
3
  Donate link: http://halgatewood.com/awesome-weather/
4
+ Tags: widgets, sidebar, shortcode, openweathermap, weather, weather widget, forecast, global, temp
5
  Requires at least: 3.5
6
  Tested up to: 3.6
7
  Stable tag: trunk
16
 
17
  Use the built in widget or add it somewhere else with this shortcode: (all settings shown)
18
 
19
+ `[awesome-weather location="Montreal" units="F" size="tall" override_title="MTL" forecast_days="2" hide_stats=1 background="http://urltoanimage.jpg" custom_bg_color="#cccccc" inline_style="width: 200px; margin: 20px; float: left;"]`
20
 
21
+ = Settings =
22
 
23
  * Location: Enter like Montreal, CA or just Montreal. You may need to try different variations to get the right city
24
  * Units: F (default) or C
27
  * Forecast Days: How many days to show in the forecast bar
28
  * Hide stats: Hide the text stats like humidity, wind, high and lows, etc
29
  * Background: URL to an image that will be used as the background of the entire widget
30
+ * Custom Background Color: Add a hex color to override the default colors
31
+ * Inline Styles: Add inline styles to your widget to float around text and whatever else
32
 
33
  All weather data is provided by http://openweathermap.org and is cached for one hour.
34
 
35
+ = Translations =
36
+ Portuguese - alvarogois
37
+
38
 
39
  == Installation ==
40
 
50
  3. Micro no features
51
  4. Widget Settings
52
  5. Background Image Option (1.2)
53
+ 5. Add inline styles to your widget and set custom background colors (1.3.1)
54
 
55
  == Upgrade Notice ==
56
 
57
+ = 1.3.1 =
58
+ Added setting for color override
59
+ Added URL param to clear transient cache '?clear_awesome_widget'
60
+ Added new translations for the days of the week in the extended forecast
61
+ Ability to add inline styles to the widget shortcode
62
+
63
  = 1.3 =
64
  Upgraded to most recent OpenWeatherMap APIS and included translation files.
65
 
92
 
93
  == Changelog ==
94
 
95
+ = 1.3.1 =
96
+ * Added setting for color override
97
+ * Added URL param to clear transient cache '?clear_awesome_widget'
98
+ * Added new translations for the days of the week in the extended forecast
99
+ * Improved caching support
100
+ * Ability to add inline styles to the widget shortcode
101
+
102
  = 1.3 =
103
  * Upgraded to most recent OpenWeatherMap APIS
104
  * Ready for translations