Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the spinupwp domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /sites/coreysalzano.com/files/wp-includes/functions.php on line 6121
WordPress – Page 2 – Corey Salzano

Category: WordPress

  • 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…

  • 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…

  • 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…

  • Hiding Specific Terms When Creating or Editing Posts

    The WordPress block editor uses the REST API to manipulate all information in the post object, so hiding terms from the category, tags, or a custom taxonomy meta box can be achieved by removing those terms from REST API responses. One hook that makes this easy is the rest_{taxonomy}_collection_params filter. Here is an example that…

  • Why Elementor Disobeys is_admin()

    I was surprised to learn that when editing a page using Elementor‘s page builder, is_admin() returns false. The reason for this is that Elementor is loading the page in an <iframe> element as if it were being viewed on the front-end. Use code like this to detect when posts or pages are being edited in…

  • Using register_setting() and the REST API

    Here is a comment I just requested be added to the bottom of the register_setting() page. If you plan to use your setting in the REST API, use both the rest_api_init and admin_init hooks when calling register_setting() instead of just admin_init. The show_in_rest argument is ineffective when hooked into admin_init alone. Corey Salzano Someday, when my comment is approved, you’ll be able to see it on…

  • The Events Calendar List Widget Replacement

    I wrote a plugin to customize the Events List widget that ships with Modern Tribe’s The Events Calendar Pro plugin. The widget has an option to hide completely when there are no upcoming events. The alternative displays the dreaded “There are no upcoming events at this time” in an otherwise empty Events List widget. I…