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
window.onload = function(){ | |
setTimeout(function(){ | |
if ( document.getElementsByTagName("html")[0].className.indexOf('lte-ie8') > -1 ) { | |
return; | |
} | |
var pageSpeed = []; | |
var values = []; | |
var colors = []; | |
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
add_shortcode('map', 'map_shortcode'); | |
function map_shortcode($atts){ | |
extract( shortcode_atts(array("key" => '', "mode" => 'place', "q" => '', "center" => '', "origin" => '', "destination" => '', "waypoints" => '', "avoid" => '', "zoom" => '', "maptype" => 'roadmap', "language" => '', "region" => '', "width" => '100%', "height" => '250', "class" => '', "style" => ''), $atts) ); | |
if ( $key == '' ) { | |
$key = ''; //@TODO: Replace with your own key to avoid designating a key every time. | |
} | |
if ( $q != '' ) { | |
$q = str_replace(' ', '+', $q); | |
$q = '&q=' . $q; | |
} |
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
/*========================== | |
Gumby Framework Shortcodes | |
By Chris Blakley | |
gearside.com | |
Documentation: http://gearside.com/wordpress-shortcodes-gumby-framework/ | |
===========================*/ |
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
//Use this instead of the_excerpt(); and get_the_excerpt(); so we can have better control over the excerpt. | |
//Several ways to implement this: | |
//Inside the loop (or outside the loop for current post/page): nebula_the_excerpt('Read more »', 20, 1); | |
//Outside the loop: nebula_the_excerpt(572, 'Read more »', 20, 1); | |
function nebula_the_excerpt( $postID=0, $more=0, $length=55, $hellip=0 ) { | |
if ( $postID && is_int($postID) ) { | |
$the_post = get_post($postID); | |
} else { | |
if ( $postID != 0 || is_string($postID) ) { | |
if ( $length == 0 || $length == 1 ) { |
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
jQuery(document).on('cut copy', function(){ | |
var currentPage = jQuery(document).attr('title'); | |
var words = []; | |
var selection = window.getSelection() + ''; | |
words = selection.split(' '); | |
wordsLength = words.length; | |
if (words.length > 8) { | |
words = words.slice(0, 8).join(' '); | |
ga('send', 'event', 'Copied Text', currentPage, words + '... [' + wordsLength + ' words]'); |
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
.ie8.no-hashchange.no-rgba-no.applicationcache.no-pointerevents div.iemode {} /* IE8 w/ IE7 Standards */ | |
.ie9.hashchange.no-rgba.no-applicationcache.no-pointerevents div.iemode {} /* IE9 w/ IE8 Standards */ | |
.ie9.no-hashchange.no-rgba.no-applicationcache.no-pointerevents div.iemode {} /* IE9 w/ IE7 Standards */ | |
.ie10.hashchange.rgba.no-applicationcache.no-pointerevents div.iemode {} /* IE10 w/ IE9 Standards */ | |
.ie10.hashchange.no-rgba.no-applicationcache.no-pointerevents div.iemode {} /* IE10 w/ IE8 Standards */ | |
.ie10.no-hashchange.no-rgba.no-applicationcache.no-pointerevents div.iemode {} /* IE10 w/ IE7 Standards */ | |
.ie7.hashchange.rgba.applicationcache.no-pointerevents div.iemode {} /* IE10 Compatibility w/ IE10 Standards */ | |
.ie7.hashchange.rgba.no-applicationcache.no-pointerevents div.iemode {} /* IE10 Compatibility w/ IE9 Standards */ |
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="bgimgweather"> | |
<?php | |
$url = 'http://w1.weather.gov/xml/current_obs/KSYR.xml'; | |
$xml = simplexml_load_file($url); | |
$currentweather = $xml->weather; | |
//$currentweather = "Light Rain"; | |
?> | |
</div> |
OlderNewer