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
$woeid = false; | |
$location = "Madrid"; // SET THIS TO YOUR SEARCH CITY | |
$awe_location_cache_name = "awe_location_cache_" . $location; | |
if( get_transient( $awe_location_cache_name ) ) | |
{ | |
$woeid = get_transient( $awe_location_cache_name ); | |
} | |
else | |
{ |
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
stdClass Object | |
( | |
[transient_name] => awe_4544349_f_en_f5 | |
[city_slug] => oklahoma-city | |
[api_query] => id=4544349 | |
[location] => Oklahoma City | |
[woeid] => | |
[owm_city_id] => 4544349 | |
[template] => custom | |
[custom_template_name] => hal |
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_cache() | |
{ | |
return 3600; // IN SECONDS | |
} | |
add_filter('awesome_weather_cache', 'hg_awesome_weather_cache'); |
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
[stripe_donate] | |
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
[stripe_donate mode="test"] | |
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
<!-- id: bibletalk --> | |
<div class="hg-stripe-donation-wrap hg-stripe-donation-layout-user-amount"> | |
<div id="hg-stripe-donation-success-bibletalk" class="hg-stripe-donation-message-box hg-stripe-donation-success-message-box"></div> | |
<div id="hg-stripe-donation-error-bibletalk" class="hg-stripe-donation-message-box hg-stripe-donation-error-message-box"></div> | |
<div id="hg-stripe-donate-form-bibletalk" class="hg-stripe-donate-form-user-amount"> | |
<p> | |
Amount: $ <input type="text" id="hg-stripe-donate-amount-bibletalk" name="hg-ajax-donate-amount" value="0" style="width:75px;"> | |
<button id="hg-stripe-donate-button-bibletalk" class="hg-stripe-donation-button">Donate</button> | |
</p> |
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
// REMOVE COMMENTS TAB IN WORDPRESS ADMIN | |
function hg_remove_comment_menu() { remove_menu_page('edit-comments.php'); } | |
add_action('admin_menu', 'hg_remove_comment_menu'); |
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 get_youtube_video_url( $youtube_id ) | |
{ | |
$data = trim(urldecode(file_get_contents('https://youtube.com/get_video_info?video_id=' . $youtube_id))); | |
$d = parse_str($data, $info); | |
$stream_map = trim($info['url_encoded_fmt_stream_map']); | |
if( !$stream_map ) return false; | |
if( substr( $stream_map, 0, 4 ) != "url=" ) |
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
<div class="awesome-weather-forecast awe_days_<?php echo $weather->forecast_days ?> awecf"> | |
<!-- TODAYS WEATHER --> | |
<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-temp"><?php echo $weather->data['current']['temp']; ?><sup><?php echo $weather->units_display; ?></sup></div> | |
<div class="awesome-weather-forecast-day-abbr">TODAY</div> | |
</div> | |
<?php foreach( $weather_forecast as $forecast ) { ?> |
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 get_youtube_video_url( $youtube_id ) | |
{ | |
$data = trim(urldecode(file_get_contents('https://youtube.com/get_video_info?video_id=' . $youtube_id))); | |
$d = parse_str($data, $info); | |
$stream_map = trim($info['url_encoded_fmt_stream_map']); | |
if( !$stream_map ) return false; |