Skip to content

Instantly share code, notes, and snippets.

View undfine's full-sized avatar

Dustin W undfine

  • Wilmington, NC
View GitHub Profile
@undfine
undfine / hubspot-form-a11y-polyfill.js
Created August 14, 2024 17:23 — forked from derekcavaliero/hubspot-form-a11y-polyfill.js
HubSpot Embedded Form Accessibility Polyfills
/**
* HubSpot Embedded Form Accessibility Pollyfills
*
* This script fixes the HubSpot HTML blunders that make their embedded forms inaccessible for assistive technology.
* - Replaces/removes improper use of <fieldset>, <legend>, <label>, and role attributes.
* - Note - this can cause forms configured for mulitple column field layouts to break - you will need to adjust your CSS accordingly.
**/
hubspotFormA11y = {
@undfine
undfine / pods_orderby_meta_value_num.php
Last active April 19, 2024 14:55 — forked from logoscreative/functions.php
Pods Shortcode orderby 'meta_value_num'
<?php
/**
* WordPress stores all meta fields as strings, which causes problems for ordering by numbers. When using Pods::find() directly, this issue can be addressed by casting the field as a decimal, as shown here: https://github.com/pods-framework/pods-code-library/blob/master/example/classes/Pods/find/examples/orderby-number.php
*
* In shortcodes, this strategy is not possible, as MySQL functions can not be used in the WordPress post editor. Instead, you can use the "pods_shortcode_findrecords_params" params filter, as shown below:
*/
/**
* Example to order by a price field properly.
*/