Skip to content

Instantly share code, notes, and snippets.

View mburnette's full-sized avatar

Marcus Burnette mburnette

View GitHub Profile
@mburnette
mburnette / latlon-wsform.js
Last active August 3, 2023 10:43
Lat/Lon coordinates in fields from WS Form map field
/*
* This assumes a few things:
* - You have WS Form installed and have a form with a Google Maps field
* - You have the Google Maps API key configured
* - You know how to set up a conditional action in WS Form
*
* Create a new Conditional Action in WS Form. Set the following:
* IF [Google Map field] is not blank
* THEN Form > Run Javascript
* ELSE blank
@mburnette
mburnette / elementor-star-rating-widget-icon.css
Created March 30, 2022 15:09
[Change Elementor star-rating widget icon] Hack to change the star-rating widget icon. #Elementor
.elementor-star-rating i {
content: '' !important;
font-family: sans-serif;
font-size: 1em;
width: 0;
padding-left: 1.35em;
overflow: hidden;
}
.elementor-star-rating i:after {
@mburnette
mburnette / sv-wc-memberships-add-billing-name-columns.php
Last active January 9, 2024 20:40
[Billing names on WC Memberships admin page] Add billing first and last name to WooCommerce Memberships admin page #WooCommerceMemberships
<?php // only copy this line if needed
/**
* Add billing first and last name to WooCommerce Memberships admin page
*/
function sv_wc_memberships_add_billing_name_columns( $columns ) {
$columns['wcmember_first_name'] = __( 'First Name' );
$columns['wcmember_last_name'] = __( 'Last Name' );
return $columns;
@mburnette
mburnette / givewp-require-lastname.php
Last active June 17, 2020 18:02
[Require last name] Require last name for donation in GiveWP. #GiveWP
<?php // only copy this line if needed
/**
* Require Last Name Snippet.
*
* Adds asterisk and error validation to the last name field of all Give forms.
* Modified from https://github.com/impress-org/givewp-snippet-library/blob/master/form-customizations/require-last-name.php
*
* @param $required_fields
* @param $form_id