} if (!$skip) { echo 'ga("set", gaCustomDimensions["staff"], "' . $usertype . '");'; } } //ISO Timestamp if (nebula_option('nebula_cd_timestamp')) { echo 'ga("set", gaCustomDimensions["timestamp"], isoTimestamp());'; } //Weather Conditions if (nebula_option('nebula_cd_weather')) { echo 'ga("set", gaCustomDimensions["weather"], "' . nebula_weather('conditions') . '");'; } //Temperature Range if (nebula_option('nebula_cd_temperature')) { $temp_round = floor(nebula_weather('temperature') / 5) * 5; $temp_round_celcius = round(($temp_round - 32) / 1.8); $temp_range = strval($temp_round) . '°F - ' . strval($temp_round + 4) . '°F (' . strval($temp_round_celcius) . '°C - ' . strval($temp_round_celcius + 2) . '°C)'; echo 'ga("set", gaCustomDimensions["temperature"], "' . $temp_range . '");'; } ?> <?php //Detect Ad Blockers. Our local show_ads.js only assigns adsEnabled variable to true. Best synchronous method of ad block detection. ?> adBlockUser = '******'; clientinfo.adblock = false; jQuery('html').removeClass('no-ads').addClass('ads'); if ( window.adsEnabled === undefined ){ clientinfo.adblock = true; adBlockUser = '******';
</strong>.</p> <p>Sunrise: <strong><?php echo nebula_weather('sunrise'); ?> </strong>, Sunset: <strong><?php echo nebula_weather('sunset'); ?> </strong>.</p> <?php } else { ?> <p><strong>Error:</strong> Weather forecast does not exist.</p> <?php } ?> </div><!--/columns--> </div><!--/row--> <div class="row"> <div class="sixteen columns"> <br /> <h4>Available Data</h4> <p>Using the 'json' parameter: <?php echo do_shortcode("[code]nebula_weather('13204', 'json')[/code]"); ?> </p> <?php echo do_shortcode('[pre lang=js]' . json_encode(nebula_weather('13204', 'json'), JSON_PRETTY_PRINT) . '[/pre]'); ?> </div><!--/columns--> </div><!--/row-->