Lately I’ve been joining Zoom meetings with lots of new users and I find I keep sharing the same tips. The short version is: use Gallery View, Mute Yourself, and take advantage of Chat.
Draft Posts
WordPress Gutenberg import versus Destructuring Global wp
When creating a block for the WordPress block editor (a.k.a. Gutenberg), you are often using existing components. WordPress makes these components available under the global JavaScript variable ‘wp’ as well as available as npm packages. Which is the better way to make a component available in your code?
WordPress and SQL Injection
An SQL injection vulnerability occurs when you use a variable in your SQL statement and someone uses the variable to add unexpected code. In this article, we’ll look at how this occurs and how to prevent it.
WordPress REST API call to Update Post Status Fails Silently
Recently, I was trying to update the post status of a post from ‘future’ to ‘publish’ publish` with the WordPress REST API and while the submission appeared to work, the value was not modified.
MySQL Query for Multiple Strings with LIKE
I recently learned that doing a MySQL “LIKE” with multiple strings separated with ‘%’ behaves the same as multiple “LIKE” statements.
Test WordPress REST API Endpoints from the Browser with jQuery
You can make WordPress REST API calls from the browser console. Here is one way I work with WordPress REST API endpoints in the browser using jQuery.
Gutenberg JS
My notes on JavaScript available methods in Gutenberg.
Git Preview Changes in Commit Message
You can set Git to preview all of the changes in your commit when you write your commit message. I find this to be a big help in writing my commits (and reminds me to keep the changes in my commits small).
Vim JSON Format
Vim allows you to run all (or some) of your content through an external program. In this case, we want to use Python to format (i.e. pretty print) our JSON with ‘python -m json.tool’. We an also setup a Vim user defined command to reduce typing (and make it easier to remember).
git switch
Git version 2.23.0 is introduced a new command ‘git switch’. This command does a subset of what ‘git checkout’ does (because ‘git checkout’ does so many different things).