Tired of whatever silly color I've picked? Rotate the overall hue by hovering the site title!

Be wary when footer debugging

I know you're not "supposed" to debug things by outputting them into or past the footer of a site, but sometimes you just need to check on something real quick, like the ID or some other bit of data about a post, and you don't feel like dealing with any proper debugging tools. The wp_footer hook then gets used and the results don't make sense. What happened?

Keep on readin' on Be wary when footer debugging

Add domain name to every site's root class list

As a purveyor of userstyles, I found myself wanting to change a tiny thing here or there on various sites without giving them each their own tiny stylesheet. I also didn't want to start adding random selectors to a global stylesheet and identifying them by comment; I wanted to identify sites by their domain, e.g. html.apnews-com and keep all styles for that site nested underneath. In order to do this, I think a userscript needs to be involved.

Keep on readin' on Add domain name to every site's root class list

A simpler alternative to the handy MutationObserver

Don't get me wrong: MutationObserver is a great addition to JS, but I find its API a bit clumsy and verbose. I always forget the specifics of its parameters and have to go look them up. Sometimes you just want to write simpler code without needing a reference, you know? Whenever I feel like I have a MutationObserver problem brewing, I go "Dang it!" and consider my options.

Keep on readin' on A simpler alternative to the handy MutationObserver

Published
Categorized as Code Tagged

Limiting dynamic WPML translations to one instead of hundreds

This isn't limited to WPML (or even WordPress), of course, as it's about translating dynamic strings in general. But SEO best practices say you must have a very specific keyword focus in your title and whatnot or your words will never be seen by human eyeballs ⸺ that your efforts will be for naught but to train some unknown but all-knowing AIs that will never pay you for your contribution.

Keep on readin' on Limiting dynamic WPML translations to one instead of hundreds