Skip to content

Instantly share code, notes, and snippets.

View ericakfranz's full-sized avatar

Erica Franz ericakfranz

View GitHub Profile
<?php
add_filter( 'optin_monster_pre_optin_mailchimp', 'tgm_om_custom_mailchimp_data', 10, 4 );
/**
* Filter the data sent to Mailchimp.
*
* See here for more info on what is passed: https://apidocs.mailchimp.com/api/2.0/lists/subscribe.php
*
* @param array $data Array of data being sent to Mailchimp.
* @param array $lead Array of lead data captured from the optin submission.
* @param string $list_id The unique list ID to subscribe the lead to.
<?php
/**
* Plugin Name: Soliloquy - Reload Page on Navigation Click and Scroll to Slider Container
* Plugin URI: https://longren.io/soliloquy-reload-page-on-navigation-click-and-scroll-to-slider-container
* Version: 1.0
* Author: Tyler Longren
* Author URI: https://longren.io/
* Description: Reloads the entire Page when the next or previous arrows are clicked, or the pager navigation is used. The correct slide is injected into the URL and scrolls to the slider container.
*
* Based on the original plugin from Tim Carr (http://www.n7studios.co.uk). This simply takes the user to the slider after the page reload, good for sliders at the end of posts/pages.
<?php
/**
* Plugin Name: Soliloquy - Change YouTube Video Arguments
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Add, edit or remove arguments for the YouTube Video Slides
*/
<?php
/**
* Plugin Name: Soliloquy - Reload Soliloquy on Click
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Registers a click handler to reload Soliloquy layouts. Useful when a Soliloquy slider isn't visible on page load.
*/
@ericakfranz
ericakfranz / envira-lightbox-custom-images.php
Last active November 20, 2018 22:38 — forked from n7studios/envira-lightbox-custom-images.php
Envira Gallery - Lightbox for Custom Images
<?php
/**
* Plugin Name: Envira Gallery - Lightbox for Custom Images
* Plugin URI: http://enviragallery.com
* Version: 2.0
* Author: Erica Franz
* Author URI: https://fatpony.me/
* Description: Use the Envira Gallery lightbox for non-gallery images throughout your site.
*/
@ericakfranz
ericakfranz / OM-non-business-email.js
Last active October 11, 2019 15:41 — forked from thomasgriffin/gist:891c405de8b6475a6772
Redirect any non-business email addresses to a custom page.
jQuery(document).ready(function($){
$(document).on('om.Campaign.load', function(e, data){
// Grab the email address submitted by the user.
var email = $('#om-' + data.optin).find('input[type="email"]').val();
// Test to ensure it is a proper email. Otherwise, redirect to another page.
if ( /@yahoo\.com$/.test(email) || /@gmail\.com$/.test(email) || /@hotmail\.com$/.test(email) || /@googlemail\.com$/.test(email) || /@live\.com$/.test(email) || /@aol\.com$/.test(email) || /@outlook\.com$/.test(email) || /@comcast\.net$/.test(email) || /@inbox\.com$/.test(email) || /@hushmail\.com$/.test(email) || /@lycos\.com$/.test(email) || /@zoho\.com$/.test(email) || /@gmx\.com$/.test(email) ) {
window[data.optin_js].optin = function(){
return window.location.href = 'https://optinmonster.com/';
};