Skip to content

Instantly share code, notes, and snippets.


Thomas Bennett thomasbennett

View GitHub Profile
View class-gf-webhooks.php
// put the code from this section into the if/else below around line 615
// if ( in_array( $request_method, array( 'GET', 'DELETE' ) ) && ! empty( $request_data ) ) {
// this garbage code will make their API work
if ( $request_method === 'GET' && 'json' === $feed['meta']['requestFormat'] ) {
// Add content type header.
$request_headers['Content-Type'] = 'application/json';
thomasbennett / show-hide.html
Last active Oct 24, 2017
Show / Hide an element with Bootstrap
View show-hide.html
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#button-id-here').on('click', function() {
<button id="button-id-here">Click Me</button>
View gist:5333083
<div itemscope itemtype="">
<a href="" title="{name}">
<img src="{img}.jpg" alt="{name}" title="{name}">
<span itemprop="name">{name}</span>
<div itemprop="aggregateRating" itemscope itemtype="">
Rated <span itemprop="ratingValue">{rating}</span>/{totalStars} based on <span itemprop="reviewCount">{totalReviews}</span> customer reviews
Product description:
View gist:5333052
<a href="" title="Ultra Emu Oil">
<img src="" alt="Ultra Emu Oil" title="Ultra Emu Oil">
View gist:5217247
<label>Store Description</label>
<span class="edit">
<textarea id="js-store-name" class="count-check"></textarea>
<span class="icon">d</span>
<span class="count-help">
<span class="count-limit">200</span> characters remaining
View gist:5216645
<div class="eight columns">
<label>Store Name</label>
<a class="edit edited"><input type="text" value="Kate's Flowers"><span class="icon">d</span></a>
<label>Store Name</label>
<a class="edit">
<textarea id="js-store-name" class="count-check"></textarea>
<span class="icon">d</span>
<span class="count-help">
View gist:5216570
var editInPlace = $('a.edit');
editInPlace.on('focus', 'input, textarea', function(){
}).on('blur', 'input, textarea', function() {
var t = $(this);
if ( t.val() != '' || t.text() != '' ) {
} else {
You can’t perform that action at this time.