Skip to content

Instantly share code, notes, and snippets.

View DrewAPicture's full-sized avatar

Drew Jaynes DrewAPicture

View GitHub Profile
@nacin
nacin / wcphilly-admin.php
Created November 5, 2011 04:03 — forked from norcross/admin_htaccess.txt
WCPhilly Admin
<?php
/*
Plugin Name: WordCamp Philly 2011 Admin
Plugin URI: http://localhost/whitelabel
Description: Some swanky stuff to make your admin look GOOD
Author: Andrew Norcross
Version: 0.1
Requires at least: 3.0
Author URI: http://andrewnorcross.com
@jt
jt / merge.md
Created August 23, 2011 18:47
Merge a forked gist

If someone forks a gist and you'd like to merge their changes. Do this:

  1. clone your repo, I use the name of the gist

     git clone git://gist.github.com/1163142.git gist-1163142
    
  2. add a remote for the forked gist, I'm using the name of my fellow developer

     git remote add aaron git://gist.github.com/1164196.git
    
@mjangda
mjangda / custom-metadata_custom-display-and-sanitize.php
Created November 5, 2010 13:50
Creates a custom field in WordPress using Custom Metadata Manager and uses custom display and sanitize callbacks
<?php
x_add_metadata_field('x_fieldCustomList2', array( 'post' ), array(
'label' => 'Post Action Items (With Links!)'
, 'display_callback' => 'fieldCustomList2_display'
, 'sanitize_callback' => 'fieldCustomList2_sanitize'
));
function fieldCustomList2_display( $field_slug, $field, $object_type, $object_id, $value ) {
$value = (array) $value;
$field_class = sprintf( 'field-%s', $field_slug );