Skip to content

Instantly share code, notes, and snippets.

View ericakfranz's full-sized avatar

Erica Franz ericakfranz

View GitHub Profile
@ericakfranz
ericakfranz / genesis-facebook-sdk.php
Created November 24, 2015 23:39
Easily include the Facebook SDK script, useful when adding Facebook Social Plugins to your site: https://developers.facebook.com/docs/plugins
<?php
/**
* Plugin Name: Genesis - Facebook SDK
* Plugin URI: https://fatpony.me/
* Description: Adds the Facebook SDK script just after the opening <body> tag on Genesis Framework sites.
* Version: 1.0.0
* Author: Erica Franz
* Author URI: https://fatpony.me/
* License: GPL2
*/
@ericakfranz
ericakfranz / optin-monster-keystroke-exit.js
Created November 24, 2015 15:58
Assign the escape key to exit an optin. ikhc6rkql15ly9mx = optin's slug
$(document).keyup(function(e) {
if (e.keyCode == 27) { // escape key maps to keycode `27`
if( typeof window.ikhc6rkql15ly9mx !=='undefined') {
window.ikhc6rkql15ly9mx.close(true);
}
}
});
@ericakfranz
ericakfranz / om-unload-jquery.js
Created November 18, 2015 18:58
OptinMonster loads jQuery v1.11.3 by default, use this to remove this function. Useful if the site is already loading a different version of jQuery and the page source is outputting multiple copies. One version for WP users, the other as plain JS.
<script type="text/javascript">
var om_load_jquery = false;
</script>
@ericakfranz
ericakfranz / wp-menu-monsterlink.php
Last active November 17, 2015 18:16
Add required link attributes to WordPress menu item for a MonsterLink.
@ericakfranz
ericakfranz / envira-gallery-trigger-lightbox-onload-first-image.js
Last active November 13, 2015 21:36
Trigger click on image in an Envira gallery to load it's lightbox when the page finishes loading.
@ericakfranz
ericakfranz / envira-gallery-remove-close-icon.css
Last active November 13, 2015 15:09
Remove Envira Gallery lightbox close icon.
@ericakfranz
ericakfranz / envira-gallery-navigation-arrow-bg.css
Last active November 27, 2015 20:06
Change the default navigation arrow images used for Envira Gallery lightbox.
@ericakfranz
ericakfranz / optinmonster-remove-optins-mobile.php
Created September 10, 2015 19:35
Remove all OptinMonster optins on mobile.
<?php
/**
* Plugin Name: OptinMonster - Remove Optins on Mobile Devices
* Plugin URI: http://optinmonster.com/
* Description: Remove all OptinMonster optins from mobile devices using wp_is_mobile();
* Version: 1.0.0
* Author: Erica Franz
* Author URI: https://fatpony.me/
* License: GPL2
*/
@ericakfranz
ericakfranz / .htaccess
Created September 5, 2015 02:20
Force SSL
#BEGIN Force SSL
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
#END Force SSL
@ericakfranz
ericakfranz / allow-monsterlinks-everywhere.php
Last active August 29, 2015 14:26
Allow more permissive filtering of Author Description field.