This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'intermediate_image_sizes', 'tgm_om_filter_image_sizes' ); | |
function tgm_om_filter_image_sizes( $sizes ) { | |
$om_sizes = array( 'optin-monster-lightbox-theme-balance', 'optin-monster-lightbox-theme-bullseye', 'optin-monster-lightbox-theme-case-study', 'optin-monster-lightbox-theme-clean-slate', 'optin-monster-lightbox-theme-transparent' ); | |
foreach ( $sizes as $i => $size ) { | |
if ( in_array( $size, $om_sizes ) ) { | |
unset( $sizes[ $i ] ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'gform_after_submission_5', 'tgm_io_remove_form_entry' ); | |
/** | |
* Prevents Gravity Form entries from being stored in the database | |
* for a specific form. In this case, the form ID is 5. Change 5 in | |
* the hook to target your specific form ID. | |
* | |
* @global object $wpdb The WP database object. | |
* @param array $entry Array of entry data. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_footer', 'tgm_om_force_specific_email_address', 999 ); | |
function tgm_om_force_specific_email_address() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$(document).on('OptinMonsterBeforeOptin', function(e, data){ | |
// Grab the email address submitted by the user. | |
var email = $('#om-' + data.optin).find('input[type="email"]').val(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'optin_monster_pre_optin_pardot', 'tgm_om_block_specific_email_domains' ); | |
function tgm_om_block_specific_domains( $data ) { | |
// If no email passed, return. | |
if ( empty( $data['email'] ) ) { | |
return $data; | |
} | |
// Check for specific email domains. If there is a match, set email to false to prevent from sending to Pardot. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'optin_monster_ajax_action', 'tgm_om_custom_tracker', 10, 2 ); | |
function tgm_om_custom_tracker( $action, $data ) { | |
// If not our action, do nothing. | |
if ( 'track_optinmonster_custom' !== $action ) { | |
return; | |
} | |
// If our ID is not passed, do nothing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
$(document).on('click', '.optin-monster-overlay .livechat_button a', function(e){ | |
// Prepare variables. | |
var $this = $(this), | |
optin = $this.closest('.optin-monster-overlay').attr('id').replace('om-', '').replace('-', '_'); | |
if ( ! window[optin] ) { | |
return; | |
} | |
// Send ajax request to track the optin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
id: 'my-template', | |
seo: { | |
}, | |
integrations: { | |
[ | |
], | |
[ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'gform_after_submission', 'tgm_io_remove_form_entry' ); | |
/** | |
* Prevents Gravity Form entries from being stored in the database. | |
* | |
* @global object $wpdb The WP database object. | |
* @param array $entry Array of entry data. | |
*/ | |
function tgm_io_remove_form_entry( $entry ) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'optin_monster_admin_styles', 'tgm_om_hide_license_key_fields' ); | |
function tgm_om_hide_license_key_fields( $view ) { | |
if ( 'overview' !== $view ) { | |
return; | |
} | |
?> | |
<style type="text/css">#optin-monster-settings-key-box, #optin-monster-settings-key-type-box { display: none; }</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Protected Content | |
* | |
* @package WordPress | |
* @subpackage Twenty_Fourteen | |
* @since Twenty Fourteen 1.0 | |
*/ | |
get_header(); ?> |