Skip to content

Instantly share code, notes, and snippets.

View ericakfranz's full-sized avatar

Erica Franz ericakfranz

View GitHub Profile
@ericakfranz
ericakfranz / autofill-om-optin-email-field.js
Created March 11, 2022 19:26
Autofill the optin email field and hide it. Specifically for use with gamified (spinning wheel) campaigns to allow spinning the wheel without collecting an email.
document.addEventListener('om.Campaign.afterShow', function(event) {
// Replace YOUR_DUMMY_EMAIL with the email address you want to autofill the field with.
// A validly formatted email address is required here.
var emailValue = "YOUR_DUMMY_EMAIL";
document.getElementById("{{ns}}-field-email").value = emailValue;
});
@johnbillion
johnbillion / wp_mail.md
Last active June 3, 2024 13:31
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@ericakfranz
ericakfranz / .htaccess
Last active March 5, 2021 18:30
WordPress .htaccess configuration file. Allows Forced SSL, Hide wp-config.php, Header ETags, GZIP Compression and Expires Caching.
## BEGIN Force SSL ##
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
## END Force SSL ##
## BEGIN WordPress ##
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
@thomasgriffin
thomasgriffin / gist:62ab0d09ca28d3e6fc7e
Created May 17, 2014 21:19
Add email and name as query args to the success redirect page in OptinMonster.
<?php
add_filter( 'optin_monster_conversion_data', 'tgm_om_modify_conversion_data', 10, 2 );
function tgm_om_modify_conversion_data( $data, $object ) {
// If there is no redirect, do nothing.
if ( empty( $data['redirect'] ) ) {
return $data;
}
if ( isset( $object->email ) && $object->email ) {