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 YOURPREFIX_remove_default_theme_site_health( $tests ) { | |
unset( $tests['direct']['theme_version'] ); | |
return $tests; | |
} | |
add_filter( 'site_status_tests', 'YOURPREFIX_remove_default_theme_site_health' ); |
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
<html lang="en"> | |
<head> | |
<title>{block:TagPage}#{Tag} | {/block:TagPage}{Title}</title> | |
<meta type="description" content="{MetaDescription}"> | |
<link rel="shortcut icon" href="{Favicon}"> | |
<link rel="alternate" href="{RSS}"> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
margin: 0; |
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
<script> | |
let clbPhotos = document.querySelectorAll('.page-index .photo-image[data-highres]'); // Replace this with the selector for whatever you want to be the trigger. | |
Array.prototype.forEach.call(clbPhotos, function(clbElement, i){ | |
clbElement.addEventListener('click', function(){ | |
let clbAttrs = clbElement.dataset; | |
let clbData = [{ | |
"width": clbAttrs.highresWidth, | |
"height": clbAttrs.highresHeight, | |
"low_res": clbElement.src, // My trigger is the image element so I can take the existing src that is currently being displayed. This is quite good for performance because I know that version is already loaded in. If you make the trigger anything else, you'll need to find another way to provide the low resolution version, it's not optional. | |
"high_res": clbAttrs.highres |
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 wbsuk_change_no_shipping_error() { | |
return '<div class="no-shipping-text">Your order cannot be completed automatically. Please <a href="contact">contact us</a> and we will confirm a price to ship to you.</div>'; | |
} | |
add_filter( 'woocommerce_cart_no_shipping_available_html', 'wbsuk_change_no_shipping_error' ); | |
add_filter( 'woocommerce_no_shipping_available_html', 'wbsuk_change_no_shipping_error' ); |
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
<html> <!-- There's no need to set a doctype, Tumblr automatically injects one. --> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="description" content="{MetaDescription}"> | |
<link rel="alternate" href="{RSS}"> | |
<link rel="icon" href="{Favicon}"> | |
<style> | |
{CustomCSS} | |
</style> | |
</head> |
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
/** | |
* Media query mixin so we don't need to duplicate breakpoints throughout stylesheets. | |
* | |
* It's better to use em for breakpoints instead of px where possible. | |
* http://bradfrost.com/blog/post/7-habits-of-highly-effective-media-queries/#relative | |
* | |
* .example { | |
* @include media-query(phone OR tablet OR desktop) { | |
* color: blue; | |
* } |
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 (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) { | |
document.documentElement.classList.add('is-safari'); | |
} | |
/** | |
* Credits: | |
* http://stackoverflow.com/questions/5899783/detect-safari-using-jquery | |
* https://developer.mozilla.org/en/docs/Web/API/Element/classList | |
*/ |
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
{block:ContentSource}(Source: <a href="{SourceURL}">{SourceTitle}</a>{block:RebloggedFrom}, via <a href="{ReblogParentURL}">{ReblogParentName}</a>{/block:RebloggedFrom}){/block:ContentSource} |
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
{block:Photoset} | |
<div class="media{block:Caption} has-caption{/block:Caption}"> | |
<div class="photoset-grid" data-layout="{PhotosetLayout}" style="visibility: hidden;"> | |
{block:Photos} | |
<img src="{PhotoURL-500}" {block:HighRes}data-highres="{PhotoURL-HighRes}"{/block:HighRes} data-width="{PhotoWidth-HighRes}" data-height="{PhotoHeight-HighRes}" {block:Caption}alt="{Caption}"{/block:caption} /> | |
{/block:Photos} | |
</div> | |
</div> | |
{block:Caption} | |
<div class="inner"> |
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
<article class="{PostType}{block:Photoset}set{/block:Photoset}"> | |
{block:Text} | |
<div class="inner"> | |
<h2{block:Title} class="has-body"{/block:Title}>{Title}</h2> | |
<div class="body"> | |
{Body} | |
</div> | |
</div> | |
{/block:Text} | |
NewerOlder