-
Digital Spring Cleaning
Holy Wah! Did I really not post anything for the entirety of 2022?!?! OK, so to try to get back into the habit of posting consistently (not that I was ever very good at it) I decided to start with a kind of “grab bag” post. So here is what I’m working on right now…
-
Detecting Back Button Usage in Non-SPAs
The biggest project I work on at work is a React-based Web App (that ISN’T a Single Page Application). At its core it is a directory listing for people on a site which are represented by custom post types with associated custom taxonomies. We’ve tried to build it to be as flexible and customizable as…
-
Delayed React Rendering
Some of the plugins I’ve been working on rewriting lately to be fully block-based use React on the frontend for their interactive elements. When I first started moving from the shortcode-based elements with AJAX calls and manual DOM updating of pre-Gutenberg, I missed the quick initial page load of a page rendered in PHP. After…
-
Debugging WordPress REST API queries
TL;DR: Add this code to your plugin/theme and it will log all SQL queries (warning it can be a lot, and will impact performance) to a queries.log file in the current directory. And don’t forget to enable SAVEQUERIES in wp-config.php I’ve been working A LOT with the WordPress REST API for a plugin I’m writing…
-
Grep and Node.js
One of my most frequently used command line utilities is Grep, specifically grep -lir which searches for text inside files (great for finding where else I referenced that variable I just renamed). As I started using Node.js more and more (and consequently my node_modules folder grew bigger and bigger) I found myself getting more annoyed…
-
Regex is MAGIC 🧙♂️
This is going to be a quick one, I should have included it in my post on “Printing the Internet” but I forgot. I do more manual data manipulation then I care to, but one of the biggest helpers in these endeavors is Regular Expressions. (the biggest help, BY FAR, is VSCode’s multiple cursors). My…
-
My new Git-moji setup
I’ve been a HUGE fan of Ahmad Awais for awhile now. Among the things he’s created that I use daily are the git commit messages from his Emjoi Log repo. With the announcement that Catalina is going to default to zsh instead of bash I decided to explore the new shell and came across Ali…
-
VVV Multitenant update✌️✌️✌️ 🏢🔼
In the past few years, I’ve given a few talks about using a multitenant WordPress install for local development. I just finished doing some major updates, most significantly switching to VVV’s built-in certificate for HTTPS, and pushed the updates to the Github repo for the project. Feel free to give it a try if you’re…
-
Ordering items in HTML forms
Recently, I was working on a plugin to convert ACF fields to the post content for a custom post type we use. The custom post type is used by another plugin I wrote that has per-site fields for the custom post type, varying from 3 fields to 37 fields. Since I wanted to make this…
-
Exporting WordPress pages in menu order
The original title for this post was “How to print the Internet in the correct order”, but my humor can fall a bit flat some times so I thought I better stick to a more descriptive title. We recently had a project at work that required us to print out the contents of one of…
Got any book recommendations?