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($){ | |
function addCharLimit(){ | |
$('textarea').each(function(){ | |
maxlength = $(this).attr("maxlength"); | |
if ( maxlength !== undefined ) { | |
charContainer = $(this).parent().find('p.charleft').val(); | |
if ( charContainer === undefined ) { | |
$(this).parent().append("<p class='charleft description'>"); | |
} | |
charleft = maxlength - $(this).val().length; |
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
<!-- begin pagination --> | |
<?php if( $engine->maxNumPages > 1 ) : | |
echo '<nav class="pagination"><ul>'; | |
$max = intval( $engine->maxNumPages ); | |
/**ID of your custom search results page here**/ | |
$permalink = get_permalink(479); | |
$prevPage = $swppg > 1 ? $swppg - 1 : false; | |
$nextPage = $swppg < $engine->maxNumPages ? $swppg + 1 : false; |
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
Let's say you run a WooCommerce subscription website, and you'd like to automatically add | |
a downloadable product to a subscriber's account when they activate their subscription. | |
Here's one way to do it: |
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 | |
/** | |
* Plugin Name: WooCommerce Disable PayPal for Subscriptions | |
* Plugin URI: https://gist.github.com/thenbrent/6641526 | |
* Description: Want to disable PayPal for subscription purchases, but still offer it as an option for buying one-off products? Activate this plugin. | |
* Author: Brent Shepherd | |
* Author URI: http://find.brentshepherd.com/ | |
* Version: 1.0 | |
* | |
* This program is free software: you can redistribute it and/or modify |
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 | |
function wholesale_product_list() { | |
$args = array( | |
'post_type' => 'product', | |
'meta_query' => array( | |
array( | |
'key' => '_wholesale_price', | |
'compare' => '!=', | |
'value' => 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
add_action( 'after_setup_theme', 'front_end_image_sizes' ); | |
function front_end_image_sizes() { | |
//Only register these on the front end for our templates | |
if ( !is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) ) : | |
add_image_size( 'hero', 2000, 1000, false ); | |
add_image_size( 'smallish', 400, 400, false ); | |
add_image_size( 'tweener', 900, 700, false ); | |
endif; | |
} |
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(a){a.fn.touchwipe=function(c){var b={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:true};if(c){a.extend(b,c)}this.each(function(){var e;var d;var i=false;function h(){this.removeEventListener("touchmove",f);e=null;i=false}function f(m){if(b.preventDefaultEvents){m.preventDefault()}if(i){var j=m.touches[0].pageX;var n=m.touches[0].pageY;var l=e-j;var k=d-n;if(Math.abs(l)>=b.min_move_x){h();if(l>0){b.wipeLeft() | |
}else{b.wipeRight()}}else{if(Math.abs(k)>=b.min_move_y){h();if(k>0){b.wipeDown()}else{b.wipeUp()}}}}}function g(j){if(j.touches.length==1){e=j.touches[0].pageX;d=j.touches[0].pageY;i=true;this.addEventListener("touchmove",f,false)}}if("ontouchstart" in document.documentElement){this.addEventListener("touchstart",g,false)}});return this}})(jQuery);jQuery(document).ready(function(a){a(window).load(function(){var g,e,c,b,f;currSlide=new Array();tabSlide=new Array();g=portfolioSlideshowOptions.psLoader; | |
e=port |
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(a){a.fn.touchwipe=function(c){var b={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:true};if(c){a.extend(b,c)}this.each(function(){var e;var d;var i=false;function h(){this.removeEventListener("touchmove",f);e=null;i=false}function f(m){if(b.preventDefaultEvents){m.preventDefault()}if(i){var j=m.touches[0].pageX;var n=m.touches[0].pageY;var l=e-j;var k=d-n;if(Math.abs(l)>=b.min_move_x){h();if(l>0){b.wipeLeft() | |
}else{b.wipeRight()}}else{if(Math.abs(k)>=b.min_move_y){h();if(k>0){b.wipeDown()}else{b.wipeUp()}}}}}function g(j){if(j.touches.length==1){e=j.touches[0].pageX;d=j.touches[0].pageY;i=true;this.addEventListener("touchmove",f,false)}}if("ontouchstart" in document.documentElement){this.addEventListener("touchstart",g,false)}});return this}})(jQuery);jQuery(document).ready(function(g){var f,d,b,a,e;currSlide=new Array();tabSlide=new Array();f=portfolioSlideshowOptions.psLoader;d=portfolioSlideshowOptions.psHas |
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
.portfolio-slideshow { | |
z-index: 0 !important | |
} | |
div.slideshow-wrapper { | |
visibility: hidden; | |
margin:0 0 10px 0; | |
} | |
/* clearfix */ |
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
$('.player-container').css('visibility', 'visible').show(); | |
/*Text Version*/ | |
$("div[id^=haiku-text-player]").each(function() { | |
var num = this.id.match(/haiku-text-player(\d+)/)[1]; | |
var ctrlId = "div#text-player-container" + num + " ul#player-buttons" + num; | |
var audioFile = $(ctrlId + " li.play a").attr("href"); | |
$(this).jPlayer({ |
OlderNewer