Skip to content

Instantly share code, notes, and snippets.

View ericakfranz's full-sized avatar

Erica Franz ericakfranz

View GitHub Profile
<?php
/**
* Plugin Name: Soliloquy - Inject Slides
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Disable touchswipe on mobile
*/
@ericakfranz
ericakfranz / gist:a718b9090a146b5327cc
Last active August 29, 2015 14:14 — forked from thomasgriffin/gist:065903820d86889cbe85
Disable OptinMonster ajax requests to track optin impressions.
<?php // Do not include this opening tag.
add_filter( 'optin_monster_data', 'tgm_om_disable_tracking' );
function tgm_om_disable_tracking( $data ) {
$data['tracked'] = true;
return $data;
}
@ericakfranz
ericakfranz / optinmonster-image-sizes.php
Last active August 29, 2015 14:14 — forked from thomasgriffin/gist:971e2ebc33118ea49bdc
Unset images sizes for all OptinMonster optin themes, install as plugin.
<?php
/**
* Plugin Name: OptinMonster Unset Images Sizes
* Plugin URI: http://optinmonster.com/
* Description: Disable the custom image sizes used in the OptinMonster themes. Optins will use full image size instead.
* Version: 1.0.0
* Author: Erica Franz
* Author URI: https://fatpony.me/
* License: GPL2
*/
@ericakfranz
ericakfranz / envira-reload-click-on-load.php
Last active April 13, 2017 15:32 — forked from n7studios/envira-reload-click.php
Register a click handler to reload Envira Gallery layouts. Useful when an Envira Gallery isn't visible on page load.
<?php
/**
* Plugin Name: Envira Gallery - Reload Enviratope on Page Load
* Plugin URI: http://enviragallery.com
* Version: 1.0
* Author: Erica Franz
* Author URI: https://fatpony.me/
* Description: Reload Envira Gallery layouts when page finishes loading.
*/
<?php
/**
* Plugin Name: Soliloquy - Output Custom Slider Item Attributes
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Add custom HTML attributes to Soliloquy Slider <img> elements
*/
<?php
add_filter( 'optinmonster_output', 'limit_views' );
function limit_views ( $optins ) {
// Replace this with your optin slug
$optin_slug = 'yf3rluqqcj-lightbox';
// Replace this with the number of views
$view_limit = 100;