Skip to content

Instantly share code, notes, and snippets.

@rileypaulsen
rileypaulsen / functions.php
Created August 19, 2014 16:08
Add Advanced Custom Fields Fields to the WP REST API
function wp_api_encode_acf($data,$post,$context){
$data['meta'] = array_merge($data['meta'],get_fields($post['ID']));
return $data;
}
if( function_exists('get_fields') ){
add_filter('json_prepare_post', 'wp_api_encode_acf', 10, 3);
}
@mjallday
mjallday / README.mkd
Created October 8, 2013 21:21
HANGMAN

Make a client

curl http://balanced-hangman.herokuapp.com

Hopefully you'll see something like

{
 "index": "/", 
 "me": "/me", 
@junosuarez
junosuarez / tap.js
Created September 11, 2012 23:19
Easily support tap events without modifying your click event handlers
/*global define: false, window: false */
define(['jquery'], function ($) {
'use strict';
return function () {
/* Begin monkey-patch Tap event support into $ */
var x = 0,
y = 0,
threshold = 40,
// Sometimes there is lag between the last update and touchend.