Skip to content

Instantly share code, notes, and snippets.

View dontfeedthecode's full-sized avatar

Tim Sheehan dontfeedthecode

View GitHub Profile
@dontfeedthecode
dontfeedthecode / 0_reuse_code.js
Created October 9, 2015 05:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dontfeedthecode
dontfeedthecode / custom-template.php
Created July 15, 2012 11:34
Easily accessing all Pod fields in Pods Framework for WordPress
<?php
// Example for use in one of your custom pod theme templates
global $pods;
$website = new Pod('websites', 'my-website');
if( !empty( $website->data ) )
{
// Pass Pod ID to function and retrieve array of fields
foreach(getPodFields($website->get_field('id')) as $field)
// Prepend with Pod name to avoid pollution
${'website_'.$field} = $website->get_field($field);