Extending WP CLI – wp config update

One gap in the abilities of WP CLI at the moment is the ability to modify an already existing wp-config.php file. v1.2 introduced the –force flag to overwrite an existing one, but that is the sledgehammer option – so I started working on it myself. I have put a very initial version on GitHub and…

Automatic SOCKS proxy for a single domain on Mac

VPNs and proxies are great – but almost always limited to funnelling all traffic through them. But what if you want to access only a single site/domain without affecting the rest of your browsing? Perhaps to access a staging site not publically available. While what I discuss below could be used as a privacy measure,…

Displaying you WordPress.org favourite plugins

Updated 02 – 05 – 18: plugins object is now returned as an array. On a whim this May bank holiday, tucked up on the sofa watching movies, I decided to create a plugin to display my favourited plugins on WordPress.org. After a bit of digging I found you can use the plugins_api() function and…

Using Garlic.js with TinyMCE WYSIWYG editor

Garlic.js is a great library – it uses localStorage to save the state of forms, so if your users accidentally close the tab or browser before submitting, their entry isn’t lost. This works seemlessly for almost all form elements, however WYSIWYG editors like TinyMCE present problems. Luckily it isn’t hard to fix – there’s a…

Uses of modulus – rows for grids and background colours

There are two things that designers will throw out quite often – box grids with rows, and repeating background colours. Sounds easy – but go and try it within the WordPress loop (or any other). It can get ugly quickly, but the solution is actually simple: Modulus. In PHP it’s the % sign. To see…