Skip to content

Instantly share code, notes, and snippets.

@jcblw
jcblw / killZoomy.js
Created November 15, 2011 01:51
asset for zoomy plugin for jquery
(function($){
$.fn.killZoomy = function(){
$(this)
//Unbinding any events attached
//be carefull not just zoomy functions
.removeClass('parent-zoom')
.unbind('click mousemove mouseover mouseleave')
//Removing inline style added inline from Zoomy
<?php
add_filter( 'woocommerce_email_attachments', 'attach_terms_conditions_pdf_to_email', 10, 3);
function attach_terms_conditions_pdf_to_email ( $attachments , $id, $object ) {
$your_pdf_path = get_template_directory() . '/terms.pdf';
$attachments[] = $your_pdf_path;
return $attachments;
}
@kshnurov
kshnurov / jquery.photoswipe.js
Created February 23, 2015 23:37
PhotoSwipe: init from DOM using jQuery
(function( $ ) {
$.fn.photoswipe = function(options){
var galleries = [],
_options = options;
var init = function($this){
galleries = [];
$this.each(function(i, gallery){
galleries.push({
id: i,
@Jinksi
Jinksi / webhook.sh
Last active August 27, 2019 14:09
Bash script for Gitlab Webhook setup & Wordpress
#!/bin/bash
# v0.9.0
# Run from Wordpress installation directory
# DEFINE COLORS
RED='\033[0;31m' # error
GRN='\033[0;32m' # success
BLU='\033[0;34m' # task
BRN='\033[0;33m' # headline
NC='\033[0m' # no color