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
img { | |
-moz-transform: scaleX(-1); | |
-o-transform: scaleX(-1); | |
-webkit-transform: scaleX(-1); | |
transform: scaleX(-1); | |
filter: FlipH; | |
-ms-filter: "FlipH"; | |
} |
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
window.mobilecheck = function() { | |
var check = false; | |
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|j |
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
/* | |
* Add item to cart on visit | |
*/ | |
function add_product_to_cart() { | |
if ( ! is_admin() ) { | |
global $woocommerce; | |
$product_id = 64; | |
$found = false; | |
//check if product already in cart | |
if ( sizeof( $woocommerce->cart->get_cart() ) > 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
/* | |
* Dynamically grab a partial based on a class name | |
*/ | |
@function get-class-partial() { | |
$className: str-slice(#{&}, 2); | |
@return "../partials/_#{$className}.scss"; | |
} | |
.signup { | |
content: "#{get-class-partial()}"; |
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 trump-url() { | |
$className: str-slice(#{&}, 2, str-length(#{&})); | |
@return "../trump/#{$className}.scss"; | |
} | |
.signup { | |
$googleapi: 'googleapis'; | |
@import url('https://fonts.#{$googleapi}.com/css?family=UnifrakturCook:700'); | |
@import "#{trump-url()}"; | |
} |
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
$breakpoints: (sm:576px, md:768px, lg:992px, xl:1200px); | |
%button-reset { | |
$media: sm; // declare which screen size this is for | |
appearance: none; | |
border: none; | |
outline: none; | |
@each $screen-size, $breakpoint-value in $breakpoints { | |
@if ( index($media,$screen-size) ) { | |
@media (min-width: $breakpoint-value) { |
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
var containerHeight = 0; | |
var outerContainerWidth = $('#outerContainer').width(); | |
$('body').append('<div id="tempCloneItems" style="width:'+outerContainerWidth+'px;"></div>'); | |
// iterate over the topic filter item containers | |
$('.heightAutoItemsThatHaveNoNumericalHeight').each(function(i,e){ | |
// a little trick I learned in 'nam to get the computed height of any element | |
// regardless of the height being specified in CSS. Works everywhere. | |
var cloneHeight = $(e).clone().addClass('someTempClass').appendTo('#tempCloneItems').height(); | |
containerHeight += cloneHeight; | |
$('.someTempClass').remove(); |
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
// version check and then corresponding session check | |
if ( ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) && ( session_status() == PHP_SESSION_NONE ) ) { | |
session_start(); | |
} | |
elseif ( session_id() == '' ) { | |
session_start(); | |
} |
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 | |
/***** 1. Start off with some php.ini setup *****/ | |
// Increases the randomness of the session ids. | |
// NOTE: This feature is supported on Windows since PHP 5.3.3. | |
// In Windows, setting session.entropy_length to a non zero value will make PHP use the Windows Random API as entropy source. | |
ini_set('session.entropy_file', '/dev/urandom'); | |
// Sets how many bytes or characters are used from the above line's entropy file. 512 is pretty damn solid (27 August 2014) |