Learning out Loud in Milwaukee, WI

Tag: WordPress

  • How can I use PHP Namespaces in WordPress Plugins

    PHP has long had a problem of naming collisions. Because older versions of PHP had no way of declaring methods outside the global space, developers came up with several different ways of preventing and checking for namespace collisions, none of which treated the underlying condition. These many and varied solutions begged for a unifying standard…

  • Writing Unit Tests for WordPress

    This post and others like it still get a strange amount of traffic. It’s worth noting the details here are out of date and I won’t be keeping it up. Use at your own risk! In my last post I wrote about two testing libraries for WordPress and briefly discussed the difference between integration tests…

  • Why Unit Testing in WordPress Matters

    Testing WordPress has become a favorite topic of mine lately: moving away from hitting refresh and toward something more holistic, reliable, and automatable. I’ve written before about a testing method called called browser testing, which verifies a webpage has some expected behavior. These kinds of tests are great but they’re not perfect. They require a…

  • How can I use Feature Switches in WordPress

    While a colleague and I were discussing the rollout of a new feature to our public facing website, he asked me if it would be possible to “hide” the new content behind a toggle. Effectively, he was asking me to write a feature switch, a best practice of continuous integration that allows you to push…

  • How to Maybe Flush WordPress’s Rewrite Rules

    Custom post types and taxonomies are one of the most powerful tools to transform WordPress from a blogging platform to a full CMS. One of the most common problems beginning developers have when starting to use them is understanding how they work. It’s easy to think that calling register_post_type is all it takes only to…

  • How can I do Browser Testing With WordPress

    Browser testing is a basic component of a concept called behavior driven development (BDD), and one that has helped me become a better WordPress developer in the last few months. The concept of BDD is simple: test and develop around your software’s expected behavior. I recently wrote about BDD for Excella’s company blog, and this…

  • A week into Octopress

    About a week ago I successfully migrated some of my posts from harmsboone.org to this blog, I also wrote a post about some things I learned about git that week. WordPress is great. I wouldn’t recommend it (and I almost always do) if it weren’t. For someone who wants to spin up a blog and…