Skip to content

Instantly share code, notes, and snippets.

@elimn
elimn / tribe_prevent_add_cart_empty.php
Created April 29, 2016 20:22
MT | ET | Force users to select at least one ticket or RSVP before submitting the form
<?php
/*
* Prevents users from adding tickets to cart unless they have selected at least one ticket
*/
function tribe_prevent_add_cart_empty() {
echo '
<script type="text/javascript">
jQuery( document ).ready(function(){
jQuery( "form.cart" ).each(function(){
@lots0logs
lots0logs / functions.php
Last active May 14, 2019 08:40
WordPress :: Divi Builder :: Filterable Portfolio Module :: Show Lightbox On-Click
<?php
/* DON'T copy the first line (above) if your functions.php already has it.
* ---------------------------------------------------------------------- */
function my_et_theme_setup() {
if ( class_exists( 'ET_Builder_Module_Filterable_Portfolio' ) ) {
get_template_part( 'my-main-modules' );
$et_pb_filterable_portfolio = new My_ET_Builder_Module_Filterable_Portfolio();
remove_shortcode('et_pb_filterable_portfolio');
add_shortcode('et_pb_filterable_portfolio', array( $et_pb_filterable_portfolio, '_shortcode_callback' ) );
@nickcernis
nickcernis / mailchimp-popup-for-wordpress.md
Last active July 28, 2022 14:49
MailChimp Popup Script that works with WordPress sites

MailChimp's default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.

Including them in this way isn't always possible or easy with WordPress.

The code below is an alternative implementation of the loader that forces MailChimp's popup scripts to appear below all other scripts upon page load.

To use it, modify the baseUrl, uuid, and lid attributes with the ones from the original popup script that MailChimp supplies.

@htruong
htruong / pjlinkutil.pl
Created January 25, 2012 17:45
Projector Link PJLink Control script
#!/usr/bin/perl
# ------------------------------------------------------------
# Projector PJLink Control Script
#
# ------------------------------------------------------------
# 2012 IT Services, Truman State University
#
# Maintained by Huan Truong, get the latest version at
# https://gist.github.com/1677547