Author: corey
-
How to fix “Computed columns are not supported with external tables for sharded data.”
This post was written the first day I encountered this error on Azure SQL Server because I could not find any web page that contained this error message. If you’re getting the error, Computed columns are not supported with external tables for sharded data. while trying to create External Tables, remove the computed column definitions.…
-
Solving a Confusing MigrationBlocker While Moving to Azure SQL Database
This week, I’m altering functions and stored procedures in a SQL Server 2008 database so that it can be migrated to Azure. The Data Migration Assistant does a great job of generating reports identifying MigrationBlockers, but one type of error was vague enough to confuse me for a few minutes. Here’s an example of that…
-
Homebrew Competition 2019
Beer in the streets raises $103k for local charities. 11×17. https://lititz.beer
-
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…
-
Pressure Washing in Lancaster, PA
Business cards for a local pressure washing business, Clean & Co. LLC
-
-
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…
-
Editing Terms & Term Meta with the WordPress REST API
Here are some JavaScript snippets to manipulate WP_Term objects in WordPress using the REST API and the Backbone JavaScript client library. Insert a term Delete a term This next example assumes you’ve used wp_localize_script() to make the REST API endpoint and a nonce available in an object myplugin. If you need help doing this, please…
-
WordCamp Lancaster 2019
I am the lead organizer for WordCamp Lancaster for the first time in 2019, and that means I was allowed to design this logo for the event. Thanks be to fellow organizer Dustin Leer for looking at draft versions of this and sharing insights.
-
What is $posted_data passed to Contact Form 7’s wpcf7_posted_data hook
For a ContactForm7 form that has this source: <div class=”wpcf7-lead-widget”>[text* contact-name maxlength:50 placeholder “Your Name (required)”] [email* email maxlength:50 placeholder “Email (required)”] [text phone maxlength:15 placeholder “Phone”] [vehicle_form_field] [textarea comments x3 placeholder “Questions and Comments”] [submit class:_button class:_button-small “Check Availability”] [hidden context id:context “contact”] [hidden do-not-send-mail]</div> The $posted_data that is passed via the wpcf7_posted_data hook…