Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

WordPress Code Spelunking

Earlier today, I finished up a WordPress plugin that I’ve been working on for a client.  Without divulging too many details, I’ll say that it wasn’t a huge project, nor was it overly complicated, but it was interesting. One fun thing about working on projects for clients, is that it often gives you a chance to explore areas that you might not have looked too closely at on your own.

For example, some of the areas of WordPress (and PHP in general) that I researched and learned more about were:

I used a combination of the links above, other articles I found, plus some good old exploration in the WordPress core to learn more about these topics. Exploring the core code was most helpful in learning about WP_Http, wp_upload_bits(), and some extras for wp_insert_post() that aren’t documented on the Codex page.

Digging around in these corners of the code can be much like spelunking. You’re digging down into places never seen by most people, and often finding little gems that you suspected might exist, but you weren’t sure until you actually saw them. If you haven’t poked around in the core code lately, maybe you should. I usually prefer to use command-line tools like grep and a text editor. But the online WordPress phpdoc xref is a nice way to look at the code, too.

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
This entry was posted in WordPress and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

14 Responses to WordPress Code Spelunking

Leave a Reply to Dave Doolin Cancel reply

%d bloggers like this: