This has been possible for years, but it's hard to know everything, you know? That's especially true when the thing you want to use isn't even documented and it's up to your fellow nerds to figure it out.
Author: chairmanbrando
Firefox finally supports custom search engines
It's wild that it's taken this long, and it still requires some fussing around by the user to enable the feature (for now), but at least it's here. And with it we can make the smoothest Google declutterer of all! Previous iterations here:
Keep on readin' on Firefox finally supports custom search engines⟶
A rolling bike gathers no dust
It's hard to get back into something once the habit is broken. They say it takes three weeks or so to form a new habit, but at this point I'm pretty sure "habit" is not the word for this. After all, if a so-called habit can be broken so easily, doesn't that disqualify it from being considered habitual? I'd think so.
WordPress rewrites your editor styles… sometimes
I'm using the old "2021" theme as a parent theme for this site. Why? Because it's the last of the default themes not based in Gutenberg blocks. So-called "classic" themes are the best themes. Fight me.
Keep on readin' on WordPress rewrites your editor styles… sometimes⟶
Add a keyboard shortcut to preview a WordPress post in a new tab
I use post previews constantly. There's a reason I wrote code to move my drafts and scheduled posts to the top of the posts list! Imagine my disappointment, then, when I didn't see any keyboard shortcuts within Gutenberg to open a post preview in a new tab.
Keep on readin' on Add a keyboard shortcut to preview a WordPress post in a new tab⟶
Resize images with WordPress's image editor in PHP
Say you've got a list of external images to output that may be huge and mongous. In my case it was images of houses up for rent from a big-ass XML feed. It's unwise to serve these images up directly to users given that huge payloads are generally frowned upon. What you need, then, is a function that takes an image URL and caches it locally as a resized variant.
Keep on readin' on Resize images with WordPress's image editor in PHP⟶
Blinded by the light!
Does writing on GDocs have your eyeballs feeling a "closeup in Spongebob" sort of way? Try this!
There are scary drivers among us
A few posts back I mentioned that a benefit of having a dashcam is you can post your interesting clips for internet points. There are plenty of YouTube channels dedicated to compiling such footage, and I feel I'm a better and more defensive driver having watched very many of them over the years.
Always visually inspect the chamber
I don't want to use the dorky phrase "lives rent-free in my head" as many of the terminally online do, but I'm not sure anything better describes it. Here we have a guy doing not one but two negligent discharges, back to back, in his apartment:
Keep on readin' on Always visually inspect the chamber⟶
Debug PHP variables discreetly
If you don't have Xdebug involved in your current project, you may be relying on var_dump
or var_export
to check on things while coding. Depending on where in the code this happens, their output can get in the way of the rendering of a given page or be hard to read given where it lands -- in one part of a three-column block, for instance.
Get a damned dashcam already!
You ever come across a traffic jam caused by people who were in a small accident and then left their rides in the road? They're endangering themselves and others and causing traffic issues by blocking a lane or three. What are they even doing?
Get a list of all WordPress hooks that have run
In order to truly catch them all, we can use a "must-use" plugin. These live in the /wp-content/mu-plugins
folder as flat PHP files that are automatically included, in alphabetical order, before much has happened in the WordPress core loading process.
Keep on readin' on Get a list of all WordPress hooks that have run⟶
Getting around stupid paywalls
Paywalls have gotten quite prevalent over the years for a number of reasons I won't get into. I used to work for a company whose main income was selling ads on their posts about news, events, and the like, so I get the appeal of wanting people to pay for content.
WordPress shortcodes don't need fully-qualified parameters
In other words, you don't need to do something like this...
Keep on readin' on WordPress shortcodes don't need fully-qualified parameters⟶