[Plugin: Weather Forecast – WP Wunderground] Condition is "Fog" but wrong icon
-
Hello,
I really like this plugin and everything was working ok til now – today condition is “Fog” but the icon displayed is “mostlycloudy.gif”
Here is the today’s source code:<td align="center" class="wp_wunderground_fog"> <img src="https://www.unicath.hr/wp-unicath/wp-content/themes/unicath-hks/images/wundergroundicons/mostlycloudy.gif" width="50" height="50" alt="It is forcast to be Magla at 11:00 PM CEST on September 29, 2012" style="display:block;" /> <div class="wp_wund_conditions">Magla</div>26°/13°</td>
As you can see the class is ok: class=”wp_wunderground_fog” but icon is wrong.
I use my custom icon with this filter:add_filter('wp_wunderground_forecast_icon', 'use_custom_wunderground_icons'); function use_custom_wunderground_icons($content=null) { $myIconFolder = 'https://www.unicath.hr/wp-unicath/wp-content/themes/unicath-hks/images/wundergroundicons/'; $myFileType = '.gif'; $content = preg_replace('/http\:\/\/icons\-ecast\.wxug\.com\/i\/c\/[a-z]\/(.*?)\.gif/ism', $myIconFolder.'$1'.$myFileType, $content); return $content; }
I also made a translation to my language, it is in functions.php:
if (!function_exists('replace_weather')) : function replace_weather($content) { $content = str_replace('Chance of Flurries', 'Mogu?a snje?na me?ava', $content); $content = str_replace('Chance of Rain', 'Mogu?a ki?a', $content); $content = str_replace('Chance of Freezing Rain', 'Mogu?a ledena ki?a', $content); $content = str_replace('Chance of Sleet', 'Mogu?a susnje?ica', $content); $content = str_replace('Chance of Snow', 'Mogu? snijeg', $content); $content = str_replace('Chance of Thunderstorms', 'Mogu?e grmljavinsko nevrijeme', $content); $content = str_replace('Chance of a Thunderstorm', 'Mogu?a grmljavina', $content); $content = str_replace('Clear', 'Vedro', $content); $content = str_replace('Mostly Cloudy', 'Prete?no obla?no', $content); $content = str_replace('Partly Cloudy', 'Umjereno obla?no', $content); $content = str_replace('Cloudy', 'Obla?no', $content); $content = str_replace('Flurries', 'Snje?na me?ava', $content); $content = str_replace('Fog', 'Magla', $content); $content = str_replace('Haze', 'Sumaglica', $content); $content = str_replace('Mostly Sunny', 'Prete?ito sun?ano', $content); $content = str_replace('Partly Sunny', 'Djelomice sun?ano', $content); $content = str_replace('Freezing Rain', 'Ledena ki?a', $content); $content = str_replace('Rain', 'Ki?a', $content); $content = str_replace('Sleet', 'Susnje?ica', $content); $content = str_replace('Sunny', 'Sun?ano', $content); $content = str_replace('Thunderstorms', 'Grmljavinsko nevrijeme', $content); $content = str_replace('Thunderstorm', 'Grmljavina', $content); $content = str_replace('Unknown', 'n/a', $content); $content = str_replace('Overcast', 'Posve obla?no', $content); $content = str_replace('Snow', 'Snijeg', $content); $content = str_replace('Scattered Clouds', 'Mjestimi?na naoblaka', $content); $content = str_replace('Monday', 'Ponedjeljak', $content); $content = str_replace('Tuesday', 'Utorak', $content); $content = str_replace('Wednesday', 'Srijeda', $content); $content = str_replace('Thursday', '?etvrtak', $content); $content = str_replace('Friday', 'Petak', $content); $content = str_replace('Saturday', 'Subota', $content); $content = str_replace('Sunday', 'Nedjelja', $content); $content = str_replace('Today', 'Danas', $content); return $content; } add_filter('wp_wunderground_forecast', 'replace_weather'); endif;
And in my icon folder there are all icons I think, including fog.gif and chancerain.gif -two days ago the same situation was with Chance if rain: the condition was “Chance of rain” the class was ok but the icon was mostlycloudy.gif.
Funny thing is that one day before icon chancerain was displayed ok with the condition.
Do you have any idea where could it get wrong and why? Did I miss something?
Thanks
- The topic ‘[Plugin: Weather Forecast – WP Wunderground] Condition is "Fog" but wrong icon’ is closed to new replies.