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.
Author: chairmanbrando
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⟶
Nested pages cannot be found with WP_Query
It's hard to believe, I know, but despite its massive list of available parameters, WP_Query somehow doesn't seem to have the tools available to look for grandchildren (and beyond) when querying hierarchical post types. Due to it only supporting the post_parent field, you end up having to nest queries, use custom SQL, or use post__in with a secondary call of some sort to fill the "in" set of posts through which WP_Query will look.
Keep on readin' on Nested pages cannot be found with WP_Query⟶
Police departments will buy anything except more training
Following Fairfax's lead, the Richmond's police department has bought into the snake oil known as BolaWrap.
Keep on readin' on Police departments will buy anything except more training⟶
Get the WordPress document title with less work (maybe)
Reusable hero or banner partials often require more robust title-sniffing operations given to their placement inside or outside of The Loop™. In these, a simple the_title() call sometimes won't suffice, so you'll have to figure out what kind of view you're looking at and adjust the title accordingly.
Keep on readin' on Get the WordPress document title with less work (maybe)⟶