Skip to content

Instantly share code, notes, and snippets.

@atwellpub
atwellpub / store-lead.php
Last active March 28, 2016 21:15
ninjaforms action development
<?php if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Class NF_Action_Save
*/
final class NF_Actions_Inbound_Store_Lead extends NF_Abstracts_Action
{
/**
* @var string
*/
@atwellpub
atwellpub / writeup.md
Last active November 30, 2015 01:05
writeup for Digital Marketing Specialist

HTML

The html markup language is used to provide layout and styling structure to page content. In modern design it is usually coupled with CSS to perform advanced styling.

Common HTML codes

div

used to create styling containers

@atwellpub
atwellpub / mod.php
Last active November 3, 2015 20:54
<?php
wp_dequeue_script('selectjs');
wp_dequeue_script('select2');
wp_dequeue_script('select2js');
wp_dequeue_script('jquery-select2');
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{QUERY_STRING} !lp-variation-id
RewriteRule ^go/([^/]*)/([0-9]+)/ /go/$1?lp-variation-id=$2 [QSA,L]
RewriteCond %{QUERY_STRING} !lp-variation-id
RewriteRule ^go/([^/]*)? /wp-content/plugins/landing-pages/modules/module.redirect-ab-testing.php?permalink_name=$1 [QSA,L]
@atwellpub
atwellpub / functions.php
Created October 14, 2015 17:56
This gist will help programatically replace the from name and the from address on New Lead Notification emails.
<?php //remove me
add_filter('inbound_email_response/headers' , 'modify_lead_notification_headers' , 10 , 1 );
function modify_lead_notification_headers( $headers ) {
$old_from_email = '[email protected]';
$new_from_email = '[email protected]';
$old_from_name = 'The Site Name';
$new_from_name = 'The New Name';
@atwellpub
atwellpub / functions.php
Last active September 30, 2015 20:07
examples for preventing impression and conversion tracking
<?php //remove me
add_action('wp_enqueue_scripts' , 'custom_inbound_prevent_tracking');
function custom_inbound_prevent_tracking() {
wp_register_script('stop-inbound-stats-js', LANDINGPAGES_URLPATH . 'assets/js/stop_page_stats.js');
/* disable tracking if administrtor */
if (current_user_can('activate_plugins')) {
wp_enqueue_script('stop-inbound-stats-js');
}
@atwellpub
atwellpub / script.js
Last active September 29, 2015 20:21
<script type='text/javascript'>
function getQueryArgs()
{
var query = window.location.search.substring(1);
var vars = query.split('&');
var params = {}
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
@atwellpub
atwellpub / index.php
Last active May 18, 2016 23:59
calls to action, cta, documentation
<style type="text/css">
#calling-template-variables, #dynamic-template-tokens{
padding: 10px;
font-size: 14px;
text-align: left;
color: #{{color_picker_id}};
}
#demo-cta-content-wrapper {
background: #FCFCFC;
border: 5px solid;
@atwellpub
atwellpub / config.php
Created September 24, 2015 19:47
calls to action, cta
<?php //remove me
/* define dynamic template markup */
$wp_cta_data[$key]['markup'] = file_get_contents($this_path . 'index.php');
@atwellpub
atwellpub / config.php
Last active May 19, 2016 00:00
calls to action, cta
<?php //remove me
$wp_cta_data[$key]['settings'] =
array(
array(
'label' => 'Instructions', // Name of field
'description' => "This is a demo template for developers and designers to learn how to create your own call to action templates. View the source inside /wp-content/plugins/cta/templates/demo for more info", // what field does
'id' => 'description', // metakey. $key Prefix is appended from parent in array loop
'type' => 'description-block', // metafield type
'default' => '', // default content