I’ve been writing WordPress themes and plugins for about a decade and recently I’ve been putting more effort into curating a personal “boilerplate” folder for new themes and plugins. In reading through it, I can see what concepts and components have become habitual for me, regardless of the subject matter of the project.

  • Some `Constant`

Some years ago when I first interviewed with LexBlog, the CTO reiterated several times that he really wanted me to be fluent in plugins, in addition to themes. I knew my way around plugins generally, but I liked the vibe I got from the interview and I wanted the job to work out well, so

Accessibility, also known as “a11y”, refers to how well a website functions for people with disabilities. Common examples of disabilities in this space include visual conditions like color-blindness, vestibular conditions like animation nausea, and motor disabilities such as cerebral palsy, which happens to be the focus of this article.

The Feature

I am tasked with creating a “jump menu” for navigating tag archives.  Something like this:

Animated GIF - Find & Share on GIPHY

There is no submit button.  By merely selecting a menu item, the page navigates to that particular tag archive.  The premise of this UI is that, by not having to click a “submit” button, we save the user time and decision-making, hopefully improving the experience.

The Problem

This all works well enough, assuming you’re using a mouse.  But what happens if you’re using a keyboard? 
Continue Reading

JavaScript wrangling has been among the most controversial topics in front-end development for a long time now. It’s right up there with tabs vs spaces and french press vs pour over. Here’s how we do at LexBlog in all current and foreseeable projects.

The Global Object

We kick off a plugin/theme JS file with a global that is namespaced for that project, containing handy functions used throughout.  Example:

Continue Reading

I often work with exactly one plugin active, other than the plugin I’m working on and its dependencies. That plugin is Query Monitor. QM adds a button to the admin bar that turns red when I make mistake, and reveals a treasure land of begun info when I click on it.

[caption id=”attachment_2081″ align=”alignright”

I try not to get overly technical in this space, but when I get a chance to implement one of my very favorite programming techniques, I have a hard time keeping it to myself.  I want to tell you about recursion.  Per wikipedia:

A common method of simplification is to divide a problem into subproblems of the same type […] where problems are solved by solving smaller and smaller instances.

Here’s the example.  Earlier this week I was dealing with a problem where I needed to turn the english words “true” and “false” into the boolean values true and false.  This would be easy enough to do if it were simply one instance of the words:

Continue Reading

There’s nothing wrong with making mistakes, in fact I highly recommend it. However, if I make a mistake and I have no plan for preventing it from happening again, that feels pretty lame. One mistake I have made before, is forgetting if I am on a live installation or a staging installation. When I say