When an Advanced Custom Fields (ACF) field group is defined both in the database and using the local JSON feature, the settings in the local JSON file always take precedence (except in the case of viewing the definition in the WP Admin screen).
When downloading video from my iPhone to my Mac using Image Capture, I sometimes (but not always) get the error, “The operation couldn’t be completed. (com.apple.ImageCaptureCore error -9956.) (-9956)”. This is how I work around this error.
How to install dependencies with Composer (while ignoring your cached local versions). Typically, we shouldn’t have to do this but if we’re trying to recreate problems someone else is having it can be helpful.
I use Junegunn’s Vim plugin vim-easy-align to make it easier to align my code. This plugin does not have a default mapping for aligning the dollar sign ($). Because the plugin is designed to be extensible, I was able to add support for aligning by the dollar sign ($) by adding some lines to my .vimrc file.
When I do a git rebase and I get a conflict, I can use git log to see all the commits rebased thus far. However, I often get confused about what the current (incomplete) commit is that caused the conflict. It would be super helpful if I could see the commit message of the current commit. This command allows you to view the current (incomplete) commit during a rebase.
Vim has a built-in command to close all windows except the current one (:only), which is nice for focusing on a single buffer. Sometimes I want to cleanup my buffers by closing all of the buffers except for the current one. This custom command is like :only for buffers instead of windows.
WordPress has two similar translation functions __() and _x(). The function _x() does the same thing as the function __() except the _x() function allows you to define a context for the translation (with the $context parameter). This is helpful when you have a string that could be two different words. For example there are two words that are spelled “tear” each with a separate meaning (and separate pronunciation). By including the context you could use both of these words and have them correctly translated based on their $context value.
I wanted to run the latest development version of Neovim (0.4.0) to use some of the latest features (e.g. the floating window). Unfortunately, my attempts to install it were failing. These are my notes on the problem and how I fixed it.
When using Vim sometimes I want to duplicate a file, however the default file explorer in Vim (netrw) does not handle this well. This is a Vim mapping I created to make duplicating a file easier.
When making a HubSpot API call to update a date picker field, I’m getting a response with “response code 400”, “error INVALID_DATE”, and the message includes “not midnight!”. This is why I’m getting this error and how I fixed this call.