Remove Specific Campaign Based on the Referral URL
document.addEventListener('om.Campaign.startShow', function(event) { if(document.referrer.search.indexOf('google.com') > 0) { // replace with the specific referral domain var optinCampaign…
Give export capability to administrator
This snippet adds the export capability to the administrator user role.
Reset Duplicator Pro capabilities
This snippet resets the Duplicator Pro capabilities. Insert it into the wp-config.php file, refresh the wp-admin…
Insert User Status and EN-ID into localStorage (for Jason)
add_action('wp_head', 'output_auth0_user_id_meta'); function output_auth0_user_id_meta() { $script = ""; echo $script; }
Database connection test snippet
A snippet to test the connection to the database.
Add Dropdown Field To Donation Form
Shows how to add a custom dropdown in a donation form (this example the select field…
Event Use
document.addEventListener('EVENT NAME', function(event) {} );
What is Available
document.addEventListener('om.Campaign.load', function(event) { console.log(event.detail); });
om.Api.init
document.addEventListener('om.Api.init', function(event) {} );
om.Main.init
document.addEventListener('om.Main.init', function(event) {} );
om.Main.parseCampaigns
document.addEventListener('om.Main.parseCampaigns', function(event) { // This event is passed the xhr object console.log(event.detail.xhr); } );
om.Campaigns.init
document.addEventListener('om.Campaigns.init', function(event) { // This event is passed the Campaigns object console.log(event.detail.Campaigns); } );
om.Types.init
document.addEventListener('om.Types.init', function(event) { // The Campaign type. console.log(event.detail.Types.type); // The Campaign Type object (one of Floating,…
om.Analytics.init
document.addEventListener('om.Analytics.init', function(event) { console.log(event.detail.Analytics); console.log(event.detail.Campaign); } );
om.Sites.init
document.addEventListener('om.Sites.init', function(event) { console.log(event.detail.Sites); // An array of all the Site objects associated to this campaign.…