WordPress, CDNs, and jQuery

March 15, 2013

Last week, Pippin Williamson published a post titled “Why Loading Your Own jQuery is Irresponsible.” This very issues was brought up tonight at the Seattle WordPress meetup, which led to a lively discussion and referenced Pippin’s post. Please, for the love of the WordPress community, just use the version of jQuery bundled in WordPress core… […]

Read More

Passing Arguments to Callback Functions

March 7, 2013

Let’s say you want to use add_action() to attach a function to an existing action, but you want to pass your function a few arguments. This seems to be a common problem with no good solution. Yes, you could use global variables, but that’s rather messy, especially if you want to attach the same function […]

Read More

Thoughts on WordPress Data Portability

January 17, 2013

Data portability within WordPress is a big deal. However, best practices regarding how to properly make data portable are hazy at best. Where should custom post types be defined? What should happen to the data when a user switches themes? In this post I will attempt to summarize the various arguments, point out one overlooked […]

Read More

WordPress Editor: Fullscreen vs. Distraction Free

November 14, 2012

Update: The full screen editor keyboard shortcut was removed in WordPress 3.5. At the end of this article, I’ve included a few lines of code to add a full screen editor toggle button instead. WordPress 3.2 brought the introduction of the “distraction-free” editor. Its aim was to clean up the editing space and allow authors […]

Read More

Apache mod_rewrite in Ubuntu/Mint

September 13, 2012

There are many tutorials for setting up mod_rewrite for Apache, but most of them are missing one critical step. To be honest, I’m writing this as much for myself as I am for anyone else. I’m tired of looking around for the missing step every time I setup mod_rewrite on a new machine. So here […]

Read More

Year Three

June 4, 2012

Just a few days ago marked the third birthday of this website. Once again, I didn’t give the site the attention I had planned to. Nevertheless, I’ll publish a review of the year as a whole and look at what the next year might bring. Statistics Here’s a quick look at some details of the […]

Read More

Font-size and Line-height for <pre>, <code>, and Other Monospaced Fonts

February 25, 2012

While attempting to create a consistent cross-browser font baseline, I ran into the following strange behaviour in certain browsers (not IE for once!). Any monospaced font was rendered smaller than the surrounding text, even when specifically set to display at 1em. I found this to be true in both Firefox and Chrome. After a bit […]

Read More

CSS vs jQuery: Screen Widths and Scrollbars

January 21, 2012

Update: The first piece of code had an unexpected side effect that is addressed in the update at the bottom of this post. CSS media queries and jQuery window width calculations each handle scrollbars differently. This can cause unexpected (and ugly) results when they are used together. I was recently building a responsive menu system […]

Read More