Skip to content

Instantly share code, notes, and snippets.

View ptahdunbar's full-sized avatar
I may be slow to respond.

(afro)TekGod ptahdunbar

I may be slow to respond.
View GitHub Profile
@ptahdunbar
ptahdunbar / getVacTeamByName.php
Created December 6, 2012 13:55
Get your Vac Team number!
/**
* Echos which VAC team you belong to.
*
* @params string $name Name of the person employed by VC Consulting.
* @return int Vac Team
*/
function getVacTeamByName($name = '')
{
$nameTotal = 0;
foreach ( str_split($name) as $char ) {
// Find wp-config.php
for ( $i = 0; $i < $depth = 10; $i++ ) {
$path = str_repeat( '../', $i );
if ( file_exists( $path . 'wp-config.php' ) ) {
require_once( $path . 'wp-config.php' );
break;
}
}
Custom Post Types:
http://codex.wordpress.org/Custom_Post_Types
http://kovshenin.com/archives/custom-post-types-in-wordpress-3-0/
http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress/
Page Templates:
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't wanker in technology
- a medium is not a grande
- break convention for your users