Currently reading: The Runaway Jury by John Grisham

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