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 | |
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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 ployfill for GetComputed Style (for Responsive Script below) | |
if (!window.getComputedStyle) { | |
window.getComputedStyle = function(el) { | |
this.el = el; | |
this.getPropertyValue = function(prop) { | |
var re = /(\-([a-z]){1})/g; | |
if (prop === 'float') {prop = 'styleFloat';} | |
if (re.test(prop)) { | |
prop = prop.replace(re, function () { | |
return arguments[2].toUpperCase(); |
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
ة҈҈҈͟͟͟͞͞͞҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͜͜͜͝͝͝҉҉҉͢͢͢͡͡͡҈҈҈͟͟͟͞͞͞҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢͠͠͠҉҉҉͜͜͜͝͝͝҈҈҈͟͟͟͟͠͠͠͠͠͠ة҈҈҈͟͟͟͞͞͞҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͜͜͜͝͝͝҉҉҉͢͢͢͡͡͡҈҈҈͟͟͟͞͞͞҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢͠͠͠҉҉҉͜͜͜͝͝͝҈҈҈͟͟͟͟͠͠͠͠͠͠⇋░░⃝҉҉҉҉҉҉҉҉҉҉҉҉҉҉҉҉҉҉░҉░҉░҉҉҉҉҉҉҉҉҉҉҉⃝⬚⃝҉̟҉̟҉̟҉̟҉̟҉̟҉̟҉̟҉̟ ⇋░░⃝҉҉҉҉҉҉҉҉҉҉҉҉҉҉҉҉҉҉▒▓▓⃣҉͇҉͇҉͇҉͇҉͇҉͇҉͇҉͇҉͇҉҉̟҉̟҉̟҉̟҉̟҉̟҉̟҉̟҉̟░░҉҉فͤ҈ͥ҉ͦ҈ͧ҉ͨ҈ͩ҉ͪ҈ͫ҉ͬ҈ͭ҉ͮ҈ͯ҉ͨ҈ͬ҉ͧ҈ͥ҉ͦ҈ͧ҉ͨ҈ͩ҉ͪ҈ͫ҉ͬ҈ͭ҉ͮ҈ͯ҉ͨ҈ͬ҉ͧ҈ͨ҈ͧ͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏҉ͯ҈ͮ҉ͭ҈ͤ҉ͦ҈ͥ҉ͧ҈ͩ҉ͭ҈ͨ҉ͣ҈ͪ҉ͧ҈ͭ҉ͩ҈فͤ҈ͥ҉ͦ҈ͧ҉ͨ҈ͩ҉ͪ҈ͫ҉ͬ҈ͭ҉ͮ҈ͯ҉ͨ҈ͬ҉ͧ҈ͥ҉ͦ҈ͧ҉ͨ҈ͩ҉ͪ҈ͫ҉ͬ҈ͭ҉ͮ҈ͯ҉ͨ҈ͬ҉ͧ҈ͨ҈ͧ͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏͏҉ͯ҈ͮ҉ͭ҈ͤ҉ͦ҈ͥ҉ͧ҈ͩ҉ͭ҈ͨ҉ͣ҈ͪ҉ͧ҈ͭ҉ͩ҈ة҈҈҈͟͟͟͞͞͞҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͜͜͜͝͝͝҉҉҉͢͢͢͡͡͡҈҈҈͟͟͟͞͞͞҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢͠͠͠҉҉҉͜͜͜͝͝͝҈҈҈͟͟͟͟͠͠͠͠͠͠ة҈҈҈͟͟͟͞͞͞҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͜͜͜͝͝͝҉҉҉͢͢͢͡͡͡҈҈҈͟͟͟͞͞͞҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢͠͠͠҉҉҉͜͜͜͝͝͝҈҈҈͟͟͟͟͠͠͠͠͠͠ة҈҈҈͟͟͟͞͞͞҉҉҉͢͢͢͡͡͡҈҈҈͜͜͜͝͝͝҉҉҉͟͟͟͠͠͠҈҈҈͟͟͟͠͠͠҉҉҉͢͢͢ |
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
<script> | |
// Check if localStorage is supported | |
if ('localStorage' in window && typeof localStorage == 'object') { | |
jQuery(document).ready(function($) { | |
// Set the class if black-white is set | |
// Note that localStorage saves everything as strings | |
if (localStorage["black-white"] == "1") { | |
$('html').addClass('black-white'); | |
} |
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
<span class="font-size" href="#">Font Size</span> | |
<span class="black-white" href="#">Black and White</span > | |
<script src="<?php bloginfo('template_url'); ?>/library/js/libs/cooked.js"></script> | |
<script> | |
jQuery(document).ready(function($){ | |
// Check (onLoad) if the cookie is there and set the class if it is | |
if ($.cookie('font-size') == "yes") {$("body").addClass("font-size");} | |
if ($.cookie('black-white') == "yes") { $("body").addClass("black-white");} |
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
/* HC-SR04 Sensor | |
https://www.dealextreme.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696 | |
This sketch reads a HC-SR04 ultrasonic rangefinder and returns the | |
distance to the closest object in range. To do this, it sends a pulse | |
to the sensor to initiate a reading, then listens for a pulse | |
to return. The length of the returning pulse is proportional to | |
the distance of the object from the sensor. | |
The circuit: |
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 | |
$taxonomy = 'category'; | |
// get the term IDs assigned to post. | |
$post_terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) ); | |
// separator between links | |
$separator = ', '; | |
if ( !empty( $post_terms ) && !is_wp_error( $post_terms ) ) { |
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 supportsSVG() { | |
return !! document.createElementNS && !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect; | |
} | |
if (!supportsSVG()) { | |
var imgs = document.getElementsByTagName('img'); | |
var dotSVG = /.*\.svg$/; | |
for (var i = 0; i !== imgs.length; ++i) { | |
if(imgs[i].src.match(dotSVG)) { | |
imgs[i].src = imgs[i].src.slice(0, -8) + 'png'; | |
} |
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
// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie) | |
// Timing functions are the same as demo'ed here: http://jqueryui.com/demos/effect/easing.html | |
// EASE IN | |
$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530); | |
$ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); | |
$ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); | |
$ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); | |
$ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); | |
$ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035); |
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="container"> | |
<div class="sidebar_left "> | |
<a href="#" class="close mobile-only">X</a> | |
<div class="inner-div"> | |
Content Goes Here | |
</div> | |
</div> | |
<div class="sidebar_right mobile-only"> | |
<a href="#" class="close mobile-only">X</a> | |
<div class="inner-div"> |