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 | |
/* When a form is submitted, create two custom posts */ | |
function after_gform_submit($entry, $form) { | |
$isInteraction = false; | |
$interaction_type_id; | |
$supporter_email_id; | |
foreach($form["fields"] as $field) { | |
if ( $field["label"] == "Interaction Type" ) { |
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
/** | |
* @author Gabe Rose (gabe.s.rose@gmail.com) | |
* Plugin Description: | |
* This is a simple slider plugin designed to be used in WordPress Visual Composer to make easily customizable sliders. | |
* @TODO: Reduce specifity so it can actually be used separate builds. | |
*/ | |
var index = 1, | |
maxIndex = 3, | |
newIndex, |
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
//TODO: turn into jQuery function | |
$(function() { | |
$('.mix').each(function(){$(this).addClass('active');}); | |
$('.filter select').change(function() { | |
var filter = $(this).val().toLowerCase(); | |
var $filterEls = $('.mix'); | |
$filterEls.each(function() { | |
var isHidden = false; | |
var filterVal = $(this).data('filter').toLowerCase(); | |
if (filter == 'all') { |
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 ($) { | |
// An array of presentationTimeslots | |
var slots = []; | |
function presentationTimeslot(el) { | |
// So that we always have a global object scope that can't be tainted by local scopes | |
var self = this; | |
this.$el = $(el); | |
this.$parentTable = this.$el.parents('table'); |
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
import os, re, sys | |
print ("Asset Renamer v1 ::::::::::::::") | |
def replaceVersionsInFile(file): | |
#This regex matches all href and src attributes and finds version strings that either use question marks of the unicode string %3 | |
pattern = "(?:href=[\"\']?([^\"\'>]+)[\"\']?|src=[\"\']?([^\"\'>]+)[\"\']?)([\']?(?=.*%3?)[^\"\']*)|(.*(?=.*\?)[^\"\']*)" | |
fo = open(file, 'r+'); | |
text = fo.readlines() | |
fo.seek(0) | |
fo.truncate() | |
for line in text: |
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 Label plugin | |
Chartist.plugins = Chartist.plugins || {}; | |
Chartist.plugins.ctHtmlLabels = function(options) { | |
return function(chart) { | |
chart.on('draw', function(context) { | |
if (context.type === 'label') { | |
// Best to combine with something like sanitize-html | |
context.element.empty()._node.innerHTML = context.text; | |
} | |
}); |
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
/** | |
* Basic Flex Grid | |
* ---------------- | |
* This is a simple flex grid I've been using on a lot of projects. It supports both | |
* flexible grids as well as rigid column grids. While this is currently designed for internal use | |
* (it uses flexbox mixins because our build pipeline doesn't support autoprefixer yet), it's not too difficult | |
* to use in your own projects. Simply replace the flexbox mixins with their relevant rules, and you'll be good | |
* to go. | |
* @author Gabe Rose <https://gist.github.com/roseg43> | |
**/ |
OlderNewer