Skip to content

Instantly share code, notes, and snippets.

@atwellpub
atwellpub / encodingarray.php
Created March 17, 2017 19:50
encode / decode PHP array for URL travel
<?php
/**
* Encodes data into an unsubscribe token
* @param ARRAY $params contains: lead_id (INT ), list_ids (MIXED), email_id (INT)
* @return INT $token
*/
public static function encode_unsubscribe_token( $params ) {
if (isset($params['doing_wp_cron'])) {
unset($params['doing_wp_cron']);
<?php
/*
Trigger Name: WordPress user creation event
Trigger Description: This fires whenever a new user is created
Trigger Author: Inbound Now
Contributors: Hudson Atwell
*/
/* First lets make sure this class is being called nowhere else */
/* When repurpousing this class for a new use please replace User_Register with the appropiate string */
@atwellpub
atwellpub / store-lead.php
Created September 13, 2016 23:27
For Ninja Forms Devs
<?php if (!defined('ABSPATH')) exit;
/**
* Class NF_Action_Save
*/
if (class_exists('NF_Abstracts_Action')) {
final class NF_Actions_Inbound_Store_Lead extends NF_Abstracts_Action {
/**
* @var string
@atwellpub
atwellpub / index.php
Created July 15, 2016 18:33
thumbnail cta update for customer
<style type="text/css">
{%php $has_image = "{{image-url}}"; if($has_image){ return '#cta_content_left, #cta_content_right {display: inline-block !important;} #cta_content_centered{ display: none !important; }';}else{ return '#cta_content_centered{ display: inline-block !important;} #cta_content_left, #cta_content_right { display: none !important; }';} %}
.wp_cta_container {
text-align: center;
font-family: 'proxima_nova_regular', arial, sans-serif;
}
.wp_cta_container #cta-link {
}
@atwellpub
atwellpub / index.php
Created June 24, 2016 20:45
Acacia Index.php
<?php
/**
* Template Name: Acacia
* @package WordPress Landing Pages
* @author Inbound Template Generator
*/
/* Declare Template Key */
$key = basename(dirname(__FILE__));
@atwellpub
atwellpub / index.php
Created June 9, 2016 21:07
Lime App Landing Page 1.0.1
<?php
/**
* Template Name: Lime App
* @package WordPress Landing Pages
* @author Inbound Template Generator
*/
/* Declare Template Key */
$key = basename(dirname(__FILE__));
<?php
/**
* Template Name: DSC-LP Template
*
* @package WordPress Landing Pages
* @author CCB Creative
* @link http://www.ccbcreative.com
* @version 1.1
*/
@atwellpub
atwellpub / example.php
Created April 12, 2016 20:00
Example send through Mandrill snippe.
<?php
/**
* Sends email using Inbound Now's mandrill sender
*/
public static function send_email( $send_now = false) {
$settings = Inbound_Mailer_Settings::get_settings();
$mandrill = new Inbound_Mandrill( $settings['api_key'] );
@atwellpub
atwellpub / inbound-ninja-forms.php
Created March 28, 2016 20:45
Inbound Now Ninja Forms Main File
<?php
/*
Plugin Name: Inbound Extension - Ninja Forms
Plugin URI: http://www.inboundnow.com/market/support-will-complete
Description: Provides Ninja Forms 3.0 integration & field mapping
Version: 1.0.1
Author: Inbound Now
Author URI: http://www.inboundnow.com/
*/
@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
*/