• A Simpler Unit Testing Setup for WordPress

    When I was getting started in web development, I remember how conceptually overwhelming it was to understand the whys, whats, and hows around things like unit testing. And to make it even more difficult, WordPress was the environment in which I spent most of my time — a platform not...Read It
  • Creating a .map() Method for Objects, Strings, Sets, and Maps

    It’s a well-established truth of the universe that JavaScript's is one of the best parts of the language, allowing us to write cleaner, simpler code to manipulate array values, instead of using something like forEach(). For example, let’s say we want to create a copy of an array with...Read It
  • Remember to Probably Target an Empty Object with Object.assign()

    Hearken back, for a moment, to what it was like merging objects in 2014. There was no support for the feature in JavaScript runtimes themselves, and it was quite common to find a solution to the problem by wading through StackOverflow to find something like this: Despite the advancements JavaScript...Read It
  • Formatting My PHP More Efficiently with a Bash Function

    For quite some time now, I’ve been working with a PHP application that, up until recently, had no clearly-defined coding standards in place. At some point, the decision was made to enforce PSR-2, and to do so at an incremental level. When a file is touched, format to PSR-2. To...Read It
  • Quickly Spin Up MySQL w/ Docker Compose

    I've often needed to quickly spin up a local instance of MySQL. Docker Compose this makes it stupid easy. Rather than running a long, convoluted docker command, I can configure an image just the way I want it while maintaining the ability to turn it easily turn it on and...Read It
  • Writing a Regular Expression to Target Images Without a Class

    A while back, I wrote about building your own lazy loading functionality into WordPress. In that post, I use a regular expression to add a lazy-load class to image tags that don't already have any class. It failed. Rather than adding it to images with no preexisting class, it was...Read It
  • Using the 'posts_where' Filter with WP_Query in WordPress

    If you've spent 20 seconds in WordPress development, you've likely worked with, cursed, and fallen in love with the WP_Query class -- one of the most useful, commonly used tools in any given WordPress website or application. Aside from being responsible for the main query on any given page or...Read It

3 of 4