Author: corey

  • Mudbugs Hockey Jersey Patches

    Mudbugs Hockey Jersey Patches

    New shoulder patches for my hockey team’s 2018 rebrand

  • Convert alphabetical Google Sheet column names to numbers

    Lately, I’ve been working with large Google spreadsheets that have many columns. When you write QUERY statements to pull data from one sheet into another, you have to use Col1, Col2, Col3 column names instead of A, B, and C. It’s hard enough to remember the letter O is the 15th letter of the alphabet.…

  • Migrating a GravityView Without Losing Fields

    Exporting a GravityView and importing it into a different site is easy, and there are official instructions right here. This process works very smoothly when the Gravity Forms and GravityViews on both sites are identical. That’s usually not the world I live in, however. I’m a back-end developer in sites that sometimes have multiple teams…

  • Sometimes, an array is passed to the get_callback provided to register_rest_field() instead of an object

    When using register_rest_field() to add fields to terms in the WordPress REST API, the $object sent to your get_callback function will be an array instead of an object like the documentation describes. An object will still be passed, sometimes, too. Here is an example of how I work around this problem: function add_api_term_fields() { //location-phone-hours…

  • How to add an additional webhook to an Elementor Form

    Elementor Pro includes a form builder widget, complete with a webhook to which all form data can be sent and a redirect URL to send users after successful submissions. I have been tasked with adding a second webhook to a form because the first was being used for an integration with Zapier. We need to…

  • Lititz Homebrewer’s Cooperative

    Lititz Homebrewer’s Cooperative

    A logo for the local homebrew club. Join our mailing list at brew.lititz.beer.

  • WordPress REST API returns 500 error when updating serialized meta with an unchanged value

    Take care when updating posts via the WordPress REST API to not send unchanged serialized meta values. The entire update will fail and return a 500 error. The JSON response looks like this: { “code”: “rest_meta_database_error”, “message”: “Could not update meta value in database.”, “data”: { “key”: “meta_key_name”, “status”: 500 } } This error comes…

  • Setting post_parent with the WordPress REST API

    WordPress 4.9.4 does not support the post_parent attribute in the REST API, so I wrote a plugin that does. Download here: https://github.com/csalzano/wp-api-add-post-parent Someday, WordPress core will allow the manipulation of the post_parent attribute, and I look forward to deleting this plugin and this blog post when they become obsolete. Until then, I believe this implementation resembles…

  • Mitel 5000 Phone Administration Notes

    The company where I work migrated to a new phone provider, and I am publishing the notes I’ve taken over the last few years before I delete them. Most of these instructions begin inside the Mitel Administration & Diagnostics software. How to reset a voicemail box password when someone forgets their password Go to Voice…

  • The Lancaster Beacon

    The Lancaster Beacon

    I made this icon for a twitter account I started a while ago, @LancasterBeacon. News, culture & events in and around Lancaster, Pennsylvania. Follow @LancasterBeacon

  • Spinners and loading animations built into WooCommerce

    WooCommerce is a big plugin that ships with several JavaScript loading animations. There is no reason to roll your own when you need one. This week, I am hacking on WooCommerce to convert “Add to Cart” buttons to prevent redirecting users to different pages. Here’s a great tutorial I used to accomplish this goal. Without…

  • Thickbox.js: a modal API hidden in WordPress core

    Yesterday, I needed to create a modal, but I didn’t want to create a modal. “Surely, this is already in WordPress.”Corey Salzano So, I went looking for a modal in WordPress core, and I was delighted when I found one. Thickbox is JavaScript library that was created more than one decade ago and began shipping with…