Skip to content

Instantly share code, notes, and snippets.

View mike-weiner's full-sized avatar

Michael Weiner mike-weiner

View GitHub Profile
@cliffordp
cliffordp / functions.php
Last active October 12, 2022 17:04
The Events Calendar and related plugins: Add your own location for template file loading.
<?php
/**
* The Events Calendar and related plugins: Add your own location for template file loading.
*
* Example "Single Event within List View" for Avada theme (which has theme overrides).
* Now tries to load in this order:
* This plugin: /app/public/wp-content/plugins/my-plugin/tribe-events/list/single-event.php
* Theme root so it stays even if switch themes: /app/public/wp-content/themes/tribe-events/list/single-event.php
* Child theme with theme overrides: /app/public/wp-content/themes/Avada-Child-Theme/tribe-events/list/single-event.php
@spivurno
spivurno / gp-limit-choices-spots-left.php
Last active July 18, 2020 00:27
Gravity Perks // GP Limit Choices // Display Spots Left in Choice Labels
<?php
/**
* Display how many spots are left in the choice label when using the GP Limit Choices perk
* http://gravitywiz.com/gravity-perks/
*/
add_filter( 'gplc_remove_choices', '__return_false' );
add_filter( 'gplc_pre_render_choice', 'my_add_how_many_left_message', 10, 5 );
@jkudish
jkudish / limit_submissions_by_ip.php
Created September 1, 2011 23:50
filters a Gravity Form to prevent submissions from an already submitted IP, good for spam prevention
<?php
/**
* limit_submissions_by_ip()
* filters a Gravity Form to prevent submissions from an already submitted IP, good for spam prevention
* change the ID to match your form (ex: gform_pre_render_6)
* @param $form (array) the form
* @return $form (array) the filtered form
* @author Joachim Kudish <info@jkudish.com>
* @link http://jkudish.com
*/