Author: corey

  • Gravity View is_approved enumeration

    Entry approval is a Gravity View feature I use often. Even if I’m not using Gravity View on a project that needs to filter out some entries, I’ll save the same data in the $wpdb->_gf_entry_meta table to be compatible. The meta key is_approved contains one of the values in the table below. Entry is_approved meta…

  • Mimic the WordPress.org developer reference for your project

    I replicated wordpress.org’s code reference system for my own project. WordPress provides a template tag get_the_title() and it’s documented at https://developer.wordpress.org/reference/functions/get_the_title/. A plugin I just launched provides a template tag invp_get_the_price() and it’s documented at https://inventorypresser.com/docs/reference/functions/invp_get_the_price/ I learned that the .org docs page content is generated by scanning the project source code, extracting PHPDoc comments,…

  • Entries To Google Sheet, an add-on for Gravity Forms

    I built a WordPress plugin that saves a copy of all Gravity Forms entries in a Google Sheet as they are received. Entries to Google Sheet is the glue between a Gravity Form and a Google Sheet. https://entriestogooglesheet.com

  • ACF get_fields() not working but get_field() does

    This is confusing: calls to get_fields() find no Advanced Custom Fields values saved with a specific post, but calls to get_field() find values for the same post. This happens when ACF did not insert the field values, and the secondary value with the meta_key beginning with an underscore does not exist. The post has the…

  • Troubleshooting VS Code, xDebug, and Laravel Valet on macOS

    Problem: xDebug is not showing up in phpInfo() output Run <?php phpInfo(); in a browser and look for “with Xdebug” like is shown near the bottom left of this screenshot: There’s also a large section of xDebug settings near the bottom of the page. Here’s mine: If you do not see xDebug in these locations…

  • Migrate Specific WordPress Posts or Attachments

    Migrate Specific Posts or Attachments With a Third WordPress Install Duplicate the Site and Delete Posts That Won’t Move The Built-in Tools > Export Feature Preserves Post IDs An easy way to move WordPress content from one site to another is with the built-in XML import and export scripts located under the Tools menu. This…

  • Extract WordPress databases and files with exfil

    I have written and released a bash script that extracts WordPress websites and updates their local copies in my computer. It’s called exfil, it’s free and open-source, and lives on Github at https://github.com/csalzano/exfil/. To celebrate it’s release, I demoed exfil at the August 2020 burbswp.com virtual meetup, “What I’ve Learned Since Lockdowns Started”. I plan…

  • Nginx Configuration Files for Laravel Valet

    I switched to Laravel Valet for local WordPress development on my Macbook in December 2019. I love it. I presented at January’s WordPress Lancaster meetup about how and why I made the move. This week, I’ve written some code that protects uploads to the WordPress Media Library. (Did you know that anyone can view uploads…

  • Customizing a Durgod Keyboard for macOS

    I recently bought my first mechanical keyboard. The COVID-19 pandemic means I’m switching between my Macbook and a Windows machine throughout the week at the same desk, and while I was comfortable typing on the Macbook, this HP Spectre keyboard and I do not get along. The differences in shortcuts for copy and paste alone…

  • Show Attachments on The Events Calendar

    Out of the box, The Events Calendar plugin for WordPress is amazing and a pleasure to work with as a developer. However, it does not show users Media Library uploads that are attached to event posts. I made a plugin to bring this functionality to the Single Event view, it’s free and open-source, and you…

  • How to Delete Meta Fields with the WordPress REST API

    As of this writing, it is not possible to delete a meta value using the WordPress REST API. Post meta updates must be communicated while inserting and updating post objects, and the only way to “remove” meta fields is to write blank values over their current values. I wrote a free and open-source plugin to…

  • Azure External Tables: Please verify that the shards are accessible

    Are you getting this error from Azure SQL Server? Login failed on ServerName.database.windows.net.DatabaseName Please verify that the shards are accessible and that the credential information affiliated with external data source ExternalDataSourceName is correct. When I ran into this error while migrating a SQL Server instance to Azure and designing External Tables, it was because the…