When using Git, sometimes (often) I find myself forgetting to delete local branches after merging them. This command deletes this branches (and I’ve included a Git alias to make it easy to use in the future).
I setup a site for WordPress Core development with Local by Flywheel and documented the steps. If you’re trying to do the same, this might be helpful.
On a WordPress project, I wanted to display the full post on the blog archive unless a manual excerpt had been created for the post (in which case I wanted to use the manual excerpt). Here is the code I used to make this happen.
On a recent project, I had to trigger a certain behavior when a native HTML5 video had completed playing (i.e. reached the end of the video, manually stopping it should not trigger the behavior).
I’m a big fan of the Gravity Forms Form builder WordPress plugin. I came across an interesting issue on a project where I was using the default value functionality and I wanted to make some notes as a warning for others (and myself) in the future.
When working with a WordPress image, I wanted the attributes for the image. The function `wp_get_attachment_image()` provides me everything I need but in a rendered HTML string, rather than a more useful array of attributes. I was surprised I was unable to locate a good way to get this information, so I wrote this code to help me.