View sticky.swift
// 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] ) |
View awe_darksky_raw_data.php
<?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) | |
*/ |
View awesome_weather_spanish_days_of_week.php
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'); |
View one_on_mobile.css
@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; } | |
} |
View hg_day_night_weather_images.php
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"; | |
} |
View awe_today_in_forecast.php
<?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 } ?> |
View awe_ajax.php
<?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); |
View awe_mps_to_knots.php
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); |
View awe_show_weather.php
<?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