I’ve previously written about my Sublime Text packages, but I’ve since switched to the excellent Code editor. If you’ve not heard of this editor before, you may be surprised by it. It’s a fast, lightweight, powerful, well supported, free, open source, cross platform, MIT licensed, Electron powered editor, and it’s built by Microsoft. A few years ago nobody would have believed Microsoft would build such a product, but they have, and it’s excellent.
One of the problems you’ll soon run into when building a block for Gutenberg is that as a block becomes more complex, storing its complete output statically becomes undesirable. If a block contains several fields or its output contains HTML markup, you don’t want to find yourself in a situation where this output needs to be changed at some point in the future and you need to retrospectively apply changes to stored block output in every post.
Gutenberg supports dynamic block rendering so that you can perform more complex output rendering on the fly, without having to store the complete output when the block is saved. This is the same method that shortcodes in WordPress use and allows you to move away from static block output. If you’re building a block for Gutenberg that uses anything more than very simple output, you should consider using dynamic rendering.
Ever wondered about situations where WordPress sends an email? I documented them all & how to filter or disable them.
The document lists every situation where WordPress sends an email, along with how to filter or disable each email. It’s accurate as of WordPress 4.9, and will soon include some upcoming changes in WordPress 5.0.
Recently I’ve been working to reduce the Travis CI build times of not only WordPress core, but also the WordPress plugins and projects that I maintain.
I’m going to use this post to document patterns and tips that you can use to speed up your build times. Comments welcome!
Last updated April 2018.
Here’s a list of the various talks (mostly WordPress) that I’ve given in the past, and links to the video recordings and slides when they’re available.
Zen Mode: Developing While You’re Offline
Those of us who work in the web industry find that we’re online a huge amount of the time. Going offline can make us feel disconnected. But what about going offline while we’re working? Right at the time when we think we’re most likely to need an internet connection: to get our job done.
Working offline can be highly productive, and is often calming and focused. Whether we choose to go offline, or whether our surroundings make it necessary — such as while we’re traveling — having the right tools, environment, and frame of mind allows you to make working offline a joy.
In this talk, I cover the tools and approaches that I use to develop while I’m in zen mode and not connected to the internet.
I was recently investigating the code coverage of the
map_meta_cap() function in WordPress’ core unit test suite — particularly the large
switch statement contained within the function. I was surprised to see that the coverage was higher than I was expecting, because I know for a fact that several meta capabilities aren’t tested.
It turns out there is a subtle code coverage reporting issue for switch statements that allow multiple conditions to trigger one action.
For us, there’s so much more value to be gained from building on each other’s work and knowledge than trying to hold on to a short-term technological advantage.
When I’m preparing a new release of one of my plugins, its Git commit history is a great starting point to use when writing the changelog.
Rather than dealing with a bunch of parameters in
git log, I use a simple Git alias which generates a plain list of the commit messages between the previous tag and the current HEAD. I can then copy and paste this into my changelog, and go from there.
Last updated for WordPress 4.9.
Did you know that the
index.php file in a WordPress theme can be empty? There’s no need for it to contain anything at all, as long as you have the following template files in place:
Here’s a list of the developer-oriented plugins for WordPress that I use on a regular basis. (Alternative title: 10 WordPress Plugins You Can’t Live Without. You’ll Never Believe What Number 4 Does!)