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 | |
// Asset version number - change when CSS needs updating | |
$version = '20150829'; | |
// If cookie has been set and matches the version above, load CSS normally | |
if (!empty( $_COOKIE[ 'csscached' ]) && $_COOKIE[ 'csscached' ] === $version) : | |
?> | |
<link rel="stylesheet" href="/assets/styles/main.min.css?v=<?php echo $version;?>"> | |
<?php | |
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
<?php | |
/** | |
* Use in WordPress themes or plugins in order to add | |
* `async` and `defer` attributes to script tags when | |
* using `wp_enqueue_script` or `wp_register_script`. | |
*/ | |
if ( ! function_exists( 'tag_add_attribute_async' ) ) : | |
/** | |
* Add Async Attribute |
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
<form role="search"> | |
<label for="directorysearchfield">Search <abbr title="Required">*</abbr></label><!-- '*' is an abbreviation of "required". --> | |
<input id="directorysearchfield" name="search" type="search" placeholder="Enter a search term…" required aria-required="true"> | |
<input type="submit" name="submit"> | |
</form> |
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 | |
/** | |
* Functions used be the WordPress theme. | |
*/ | |
if ( ! function_exists( 'get_google_maps_src' ) ) : | |
/** | |
* Take a Google Maps API v3 key (and optional callback) and return value for the 'src' attribute to load the api script. | |
* To be used for getting the wp_enqueue_script() URI parameter. | |
* |
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
/** | |
* Custom icon font generation | |
* | |
* require gulp | |
* require gulp-consolidate | |
* require gulp-iconfont | |
* require gulp-newer | |
* require gulp-rename | |
* require browser-sync (optional) | |
* |
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 origin_year_to_current_year( $origin_year, $sep = '-', $after = '' ) | |
{ | |
$date_range = $origin_year; | |
if( date('Y') != $origin_year ) | |
{ | |
$current_year = date('Y'); | |
$date_range = $current_year . $sep . date('Y'); | |
} |
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
if (document.getElementById('widget-slide-dock')) | |
{ | |
var didScroll = false | |
, randomPost = document.getElementById('widget-slide-dock') | |
, triggerElement = document.getElementById('site-sidebar') | |
, targetPosition = (triggerElement.offsetHeight + jQuery(triggerElement).offset().top); | |
setInterval( function() | |
{ | |
if(didScroll) |
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
UPDATE wp_options SET option_value = replace(option_value, 's://ORIGINAL.COM', '://REPLACEMENT.COM') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_comments SET comment_content = replace(comment_content, 's://ORIGINAL.COM', '://REPLACEMENT.COM'); | |
UPDATE wp_posts SET post_content = replace(post_content, 's://ORIGINAL.COM', '://REPLACEMENT.COM'); | |
UPDATE wp_posts SET guid = replace(guid, 's://ORIGINAL.COM', '://REPLACEMENT.COM'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 's://ORIGINAL.COM', '://REPLACEMENT.COM'); | |
UPDATE wp_usermeta SET meta_value = replace(meta_value, 's://ORIGINAL.COM', '://REPLACEMENT.COM'); | |
UPDATE wp_links SET link_url = replace(link_url, 's://ORIGINAL.COM', '://REPLACEMENT.COM'); | |
UPDATE wp_links SET link_image = replace(link_image, 's://ORIGINAL.COM', '://REPLACEMENT.COM'); | |
UPDATE wp_blogs SET domain = replace(domain, 'ORIGINAL.COM', 'REPLACEM |