MtnWeekly.com gets a facelift

For this project I updated the¬†MtnWeekly News¬†WordPress template. I added to the template some widget and menu locations so MtnWeekly News can easy control the layout. The new header got 1) a widget area for ad space, 2) the site masthead, and 3) main menu location. All three can be controlled and maintained using the … Continue reading MtnWeekly.com gets a facelift

Parsing HTML5 IMG srcset

I needed a simple function to use in a TrailsNH Bot to find the largest image in an HTML5 srcset. Here’s what I came up with. function getLargestImage($srcsetString){ $images = array(); // split on comma $srcsetArray = explode(“,”, $srcsetString); foreach($srcsetArray as $srcString){ // split on whitespace – optional descriptor $imgArray = explode(” “, trim($srcString)); // … Continue reading Parsing HTML5 IMG srcset