johnbchrise
Forum Replies Created
-
Forum: Plugins
In reply to: [Weather Underground] icons-ecast hosedIt’s working after utilizing LingoSam’s (Find all instances of https://icons-ecast.wxug.com/ and replace them with https://icons-ak.wxug.com/) fix.
Thanks again everyone for the crucial time-saving input!
Forum: Plugins
In reply to: [Weather Underground] icons-ecast hosedYou guys rock for taking the time to share such detailed and great info! I will try your suggestion wdesousa as soon as I have a few minutes to dedicate to it.
Forum: Plugins
In reply to: [Weather Underground] icons-ecast hosedHow about just using the option of uploading your own icon set and allowing to pull form sever in which your site resides? In the wp-wunderground text file, it gives “instructions” how to do this, but it doesn’t make entire sense to me. here is what the text doc says:
If you want to use your own icons, you would add a filter to the bottom of your theme’s
functions.php
file:<h3>Version 1.2+</h3>
add_filter('wp_wunderground_forecast_icon', 'use_custom_wunderground_icons'); function use_custom_wunderground_icons($content=null) { $myIconFolder = 'https://www.example.com/images/'; $myFileType = '.gif'; $content = preg_replace('/http\:\/\/icons\-ecast\.wxug\.com\/i\/c\/[a-z]\/(.*?)\.gif/ism', $myIconFolder.'$1'.$myFileType, $content); return $content; }
<h3>Version 1.1</h3>
add_filter('wp_wunderground_forecast', 'use_custom_wunderground_icons'); function use_custom_wunderground_icons($content=null) { $myIconFolder = 'https://www.example.com/images/'; $myFileType = '.gif'; $content = preg_replace('/http\:\/\/icons\-ecast\.wxug\.com\/i\/c\/[a-z]\/(.*?)\.gif/ism', $myIconFolder.'$1'.$myFileType, $content); return $content; }
Can anyone make better sense of this? What do I name the actual icons?
Also, from the Wunderground site, vague reference is given here to adding a set of icons. Click here to view the post.