Passing variables into WordPress hooks using an anonymous function I thought was impossible. I always worked around this and rewrote the logic. Today I found out anonymous functions support a use keyword, allowing passing:
So simple and easy. Shaves hours of troubleshooting.
tinypng-cli is an amazing tool to compress an image, or a directory of images with a single command. It’s beautiful for fixing the few images that a normal compressors miss or don’t do a good job on, or the images that slip between the cracks.
A big part of my day is ensuring all my sites have very high Google Page Speed scores, which are heavily factored by images alone. I sure I wish I had known about this tool years sooner, would of saved me hours of manually work.
Really simple to setup:
Get a API key from TinyPNG (free tier: 500 image cap)
I explored and tested a bunch of WordPress plugins for S3 – they’re excellent in their own right, but I was bothered by the bloat & weight on PHP for the backup. Don’t get me wrong, I understand it’s a complex undertaking when you’re creating a backup/restore UI, working off wp-cron, creating many features that benefit lots of people, etc. But I didn’t need any of that – I just need my server backed up without dealing with anything.
Quick search of Github lead me to a beautiful shell script that uses wp-cli and awscli to preform the backups. Here’s the kicker: it takes less than 40 lines of code. I modified it a bit for my needs and it works better than I thought possible:
Amazing. Runs with sh backup.sh thrown into crontab. Amazing.
Gutenberg will be replacing the text editor on your WordPress website, prepare yourself! Learn all about WordPress’s upcoming editor. In this meetup we’ll cover: – the reasons for Gutenberg’s creation – it’s ease of use and the problems it solves – the current and future state of themes in relation to Gutenberg – a sneak peak at what plugins will s…
Gutenberg will be replacing the text editor on your WordPress website, prepare yourself!
Learn all about WordPress’s upcoming editor. In this meetup we’ll cover:
the reasons for Gutenberg’s creation
it’s ease of use and the problems it solves
the current and future state of themes in relation to Gutenberg
a sneak peak at what plugins will soon look like in Gutenberg
what this all means for your WordPress site
what this all means for the future of WordPress
how Gutenberg will become a full fledged Page Builder
developers: overview of logic, plus tips & tools for writing blocks
Not required but feel free to bring along your laptop, there’s hands on tools to test out Gutenberg (without having to install Gutenberg on your site [but we’ll cover that too])
Followed by an open Q&A about anything and everything WordPress.
Update: This was too hard to maintain, and things “got weird” sometimes. I’ve moved to Dropbox instead, very happy.
I have my localhost server on iCloud. Cloud syncing, in my opinion, is the most reliable way to ensure what you’re working on is backedup to the second.
However, 18,000+ file folders like /node_modules/ is just ridiculous to have syncing. I have nothing to prove this, but I’m certain having one or more folders like this would at some point negatively effect syncing and/or indexing.
So, as far as I’ve found the best way to prevent folders like /node_modules/ from syncing is appending .nosync to the end, then symbolically linking to.
This gives you a nice little “Ineligible” tag on your huge folder, and your symbolic link sits there.