Fun?! with Subversion and WordPress

OK, so I’m a bit of a Cowboy Coder and after a session with Mark Jaquith the other week at WordCamp San Francisco, I’ve been mildly shamed into learning what I need to start using version control.

At home I have a pretty high-powered gaming PC and when I’m on the go I’m using a MacBook Pro. So the first thing I did using a (somewhat old but relevant) guide by Westi to setup TortoiseSVN on my PC and started hooking up my WordPress Trunk build repo using SVN. Prior to now, I’ve always sort of done it the hard way, e.g. a whole lot of downloading and ftp-ing a couple of times a week.

First impression: SVN is kind of complicated at first, but once you sort of get the hang of it, it’s a heckuva lot less work overall. After I got the hang of doing checkouts, updates and commits with my local repo, I got a little more ambitious and set out to get SVN setup on my VPS.

After an install, uninstall and re-install, I finally got all of the ra_* (See: Repository Access) modules in place that would allow me to checkout code from http & https URLs. Thanks to a very helpful guide by Otto, I managed to setup svn:externals and perform a couple of checkouts and updates directly from the WordPress trunk and my VPS. Pretty neat.

NoteToSelf: Next time: Read about it, read about it, try, fail, try, fail, fail, WIN.

WordPress On the Brain after WordCamp San Francisco

Wow, OK, so this is a random collection of thoughts after #WCSF last weekend.

Never before have I dreamt, thought about or immersed myself in so much WordPress in such a short amount of time.

#WCSF proved to be ample opportunity for networking, learning, eating and traveling. I met a lot of really passionate people out there from bloggers to developers, designers, entrepreneurs, web hosts and many of the people behind the mammoth that WordPress has become. It really was a fun time.

So here’s a shoutout to Adria Richards, Theme.fm, bluehost, Dream Host, the guys over at Media Temple, Matt Mullenweg, Brad Williams, Jeff Kropp, Lou Anne McKeefery, Pete Mall, Brian Tickler, Dan Ross, the guys over at StudioPress, Adam Chew, Linda Sherman and many others.

Probably the best-spent 3 days I’ve had in the 3 years I’ve been developing and designing for WordPress. Until next time!

WordPress 3.3 Could Improve Child Theme Integration

According to a recent WordPress trac ticket, theme authors could soon be rewarded with a little nugget of functionality that would make using child themes much more extensible.

The ticket suggests introducing a function that works similarly to locate_template(), but rather than returning the path of the file (in the parent theme only), it would return a URI to the file, thus allowing a child theme to override the parent’s .js, .css and even image files. The proposed function is called locate_theme_file().

According to the suggested patch posted by johnbillion, this is the current method for loading template files in parent themes only:


wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); 

If locate_theme_file() is introduced, we could instead see functions like these:


wp_enqueue_style( 'dark', locate_theme_file( 'colors/dark.css' ), array(), null ); 

wp_enqueue_style( 'bar', locate_theme_file( 'bar.css' ) );

<img src="<?php echo locate_theme_file( 'icon.png' ); ?>" />

locate_theme_file() would automatically load any of these files via the child theme, BEFORE the parent. Pretty neat huh?

Up to this point, child themes could only override a parent theme’s template files. If theme authors are rewarded with the ability to enqueue many more types of files at the child theme level with this much ease, I anticipate seeing some really exciting new uses for child themes emerging.