This file contains hidden or 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 | |
| $weather_settings = new stdclass; | |
| $weather_settings->location = 'Edmond, OK'; | |
| $weather_settings->owm_city_id = 4535740; | |
| $weather_settings->transient_name = 'awe-edmond-weather-c'; | |
| $weather_settings->forecast_days = 5; | |
| $weather_settings->units_query = 'metric'; | |
| $city_id = awe_get_ip_city_id( $weather ); |
This file contains hidden or 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
| $weather = awesome_weather_logic( array( | |
| 'location' => 'Phoenix', | |
| 'allow_user_to_change' => 1, | |
| 'longlat_triggered' => 1, | |
| 'longlat_location' => '33.448377,-112.074037' | |
| )); |
This file contains hidden or 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
| <style> | |
| /* STRIP */ | |
| .awe_strip { padding: 0; width: 100%;} | |
| .awe_strip .awesome-weather-header { margin-left: -10px; padding: 10px 15px; } | |
| .awe_strip .awesome-weather-strip-line { padding: 10px; white-space: nowrap; display: block; padding-right: 50px; text-transform: uppercase; overflow: hidden; overflow-x: scroll; } | |
| .awe_strip .awesome-weather-strip-stat { padding: 0 10px; } | |
| .awe_strip .awesome-weather-strip-line strong { padding-right: 5px; } | |
| .awe_strip .awesome-weather-form { top: 5px; left: 5px; right: 35px; bottom: 5px; } |
This file contains hidden or 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 | |
| include( dirname(__FILE__) . "/../../plugins/awesome-weather-pro/pro/openweathermaps/funcs.php"); | |
| $weather_settings = new stdclass; | |
| $weather_settings->location = 'Edmond, OK'; | |
| $weather_settings->owm_city_id = 4535740; | |
| $weather_settings->transient_name = 'awe-edmond-weather-c'; | |
| $weather_settings->forecast_days = 5; | |
| $weather_settings->units_query = 'metric'; |
This file contains hidden or 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
| $video_obj = get_field('vimeo_field'); | |
| if( !has_post_thumbnail() AND $video_obj ) | |
| { | |
| Generate_Featured_Image( $video_obj->thumbnail_large, get_the_ID() ); | |
| } |
This file contains hidden or 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
| if( !function_exists('Generate_Featured_Image') ) | |
| { | |
| // FUNCTION FOUND ON GITHUB | |
| function Generate_Featured_Image( $image_url, $post_id ) | |
| { | |
| $upload_dir = wp_upload_dir(); | |
| $image_data = file_get_contents($image_url); | |
| $filename = basename($image_url); | |
| if(wp_mkdir_p($upload_dir['path'])) $file = $upload_dir['path'] . '/' . $filename; | |
| else $file = $upload_dir['basedir'] . '/' . $filename; |
This file contains hidden or 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 $vimeo_video = get_field('vimeo_id'); ?> | |
| <img src="<?php echo $vimeo_video->thumbnail_medium; ?>"> | |
| <h1><?php echo $vimeo_video->title; ?></h1> | |
| <p><?php echo $vimeo_video->description; ?> | <?php echo $vimeo_video->length; ?></p> | |
| <iframe src="https://player.vimeo.com/video/<?php echo $vimeo_video->id; ?>" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> |
This file contains hidden or 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 id="testimonial_rotator_wrap_5166" class="testimonial_rotator_wrap with-prevnext"> | |
| <div id="testimonial_rotator_5166" class="testimonial_rotator hreview-aggregate cycletwo-slideshow format-rotator template-default" data-cycletwo-timeout="5000" data-cycletwo-speed="1000" data-cycletwo-pause-on-hover="true" data-cycletwo-center-horz="true" data-cycletwo-center-vert="true" data-cycletwo-swipe="true" data-cycletwo-fx="scrollHorz" data-cycletwo-auto-height="calc" data-cycletwo-next="#testimonial_rotator_wrap_5166 .testimonial_rotator_next" data-cycletwo-prev="#testimonial_rotator_wrap_5166 .testimonial_rotator_prev" data-cycletwo-slides="> div.slide" data-cycletwo-log="false" > | |
| <div class="slide slide1 testimonial_rotator_slide hreview itemreviewed item has-image cf-tr"> | |
| <div class="testimonial_rotator_img img"><img width="150" height="150" src="" class="attachment-thumbnail size-thumbnail wp-post-image" alt="" /></div> | |
| <div class="text testimonial_rotator_description"> | |
| <h3 class="testimon |
This file contains hidden or 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']['temp']) ) echo $weather->data['current']['temp']; ?> |
This file contains hidden or 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_dequeue_style() | |
| { | |
| wp_dequeue_style('awesome-weather'); | |
| wp_deregister_style('awesome-weather'); | |
| wp_enqueue_style( 'awesome-weather', '/wp-content/plugins/awesome-weather-pro/awesome-weather.css' ); | |
| } | |
| add_filter( 'wp_print_styles', 'hg_dequeue_style', 100 ); |