Skip to content

Instantly share code, notes, and snippets.

View dvdpearson's full-sized avatar

David Pearson dvdpearson

  • San Francisco, CA
View GitHub Profile
@mjangda
mjangda / remove-post-term.php
Created December 21, 2011 15:11
Remove a given term from the specified post. This function is missing from core WordPress.
<?php
/**
* Remove a given term from the specified post
*
* Helper function since this functionality doesn't exist in core
*/
function my_remove_post_term( $post_id, $term, $taxonomy ) {
if ( ! is_numeric( $term ) ) {
@tomzmtl
tomzmtl / Ajax.js
Last active December 11, 2015 03:33
Simple Ajax wrapper (Vanilla JS + Q Promises)
var Ajax = (function()
{
/**
* Serialize and URL-encode provided object.
* Note: not recursive, for single-level objects only.
* @param Object params
* @return String
*/
function _serializeParams ( params )