This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// USAGES: | |
// SQUARE WITH A TOP PADDING OF 20 | |
icon.stick(top: view.topAnchor, padTop: 20, width: 80, height: 80) | |
// PADDING TOP AND RIGHT | |
label.stick(top: view.topAnchor, trailing: view.trailingAnchor, padding: [20,20,0,0] ) | |
// PADDING TOP AND BOTTOM = 20, RIGHT AND LEFT = 0 | |
label.stick(top: view.topAnchor, trailing: view.trailingAnchor, padding: [20,0] ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Parameters: | |
1. Latitude | |
2. Longitude | |
3. Format: all, currently, minutely, hourly, daily | |
4. Dark Sky Secret Key | |
5. Cache time in seconds (default: 15 minutes) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function awesome_weather_spanish_days_of_week() | |
{ | |
return array('Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'); | |
} | |
add_filter('awesome_weather_days_of_week', 'awesome_weather_spanish_days_of_week'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (max-width: 640px) | |
{ | |
.testimonial_rotator.template-threepigs .slide .testimonial_rotator_slide_inner:nth-child(2) { display: none; } | |
.testimonial_rotator.template-threepigs .slide .testimonial_rotator_slide_inner:nth-child(3) { display: none; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hg_awesome_weather_bg_ext() | |
{ | |
// 24 HOUR CLOCK: | |
// LESS THAN 8 AM OR GREATER THAN 9 PM | |
if( get_the_time('G') < 8 || get_the_time('21') > 9 ) | |
{ | |
return "night.jpg"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( isset($weather->data['current'])) { ?> | |
<div class="awesome-weather-forecast-day"> | |
<?php if($weather->show_icons) { ?><i class="<?php echo $weather->data['current']['icon']; ?>"></i><?php } ?> | |
<div class="awesome-weather-forecast-day-abbr"><?php echo $weather->t->now; ?></div> | |
<div class="awesome-weather-forecast-day-temp"><?php echo $weather->data['current']['temp']; ?></div> | |
</div> | |
<?php } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hg_plugins_loaded() | |
{ | |
if( isset($_GET['weather_widget']) ) | |
{ | |
echo awesome_weather_logic( array('location' => 'Boston', 'owm_city_id' => 4930956, 'use_user_location' => true, 'background_by_weather' => true )); | |
die; | |
} | |
} | |
add_filter('plugins_loaded', 'hg_plugins_loaded', 100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hg_awesome_weather_wind_speed( $data, $speed, $direction ) | |
{ | |
$data['speed'] = round($data['speed'] * 1.94384); | |
$data['text'] = " knots"; | |
return $data; | |
} | |
add_filter('awesome_weather_wind_speed', 'hg_awesome_weather_wind_speed', 10, 3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$where = new stdclass; | |
$where->location = "Dublin"; | |
$where->owm_city_id = 2964574; | |
$where->units = "F"; | |
$weather = get_awesome_weather_openweathermaps( $where ); | |
if( isset($weather->data['current'])) { ?> | |
<div class="awe-weather"> | |
<i class="<?php echo $weather->data['current']['icon']; ?>"></i> | |
<?php echo $weather->data['current']['temp']; ?>° <?php echo $weather->data['current']['description']; ?> |
NewerOlder