Skip to content

Instantly share code, notes, and snippets.

View oknoway's full-sized avatar
Zip! Zap! Zop!

Nate Bedortha oknoway

Zip! Zap! Zop!
View GitHub Profile
// =Utility Classes
// These silent classes, called with @extend, and never output to CSS unless specifically called.
// example:
// @extend %ir;
// Image Replacement
%ir {
background-color: transparent;
border: 0;
overflow: hidden;
function getWeather() {
if (false === ( $theWeather = get_transient('theWeather') ) ) {
$xmlUrl = 'http://www.google.com/ig/api?weather=portland&oe=utf-8&';
$output = wp_remote_fopen($xmlUrl);
$xmlData = simplexml_load_string($output);
$conditions = $xmlData->weather->current_conditions->condition['data'];
$raining = array( 'Showers', 'Scattered Showers', 'Chance of Rain', 'Chance of Storm', 'Rain', 'Light Rain' );