From 1a0fc0b3c78cdecb8dea938abc92a3fe73922dc7 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 7 Jan 2016 16:52:50 -0500 Subject: [PATCH] Just incase the response is not fast enough for the style sheet. --- functions.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/functions.php b/functions.php index 91e4e23..fce0108 100644 --- a/functions.php +++ b/functions.php @@ -91,6 +91,20 @@ function keweenaw_get_season() // close curl resource to free up system resources curl_close($ch); + if ( $output == '' ) { + // based on the year + $current_month = date( 'm' ); + if ( $current_month >= "03" && $current_month == "05" ) { + $season = 'spring'; + } else if ( $current_month >= "06" && $current_month == "08" ) { + $season = 'summer'; + } else if ( $current_month >= "09" && $current_month == "11" ) { + $season = 'fall'; + } else { + $season = 'winter'; + } + return $season . '.css'; + } return $output; } -- 2.17.1