Skip to content

Instantly share code, notes, and snippets.

@atwellpub
atwellpub / response.json
Created September 17, 2014 23:19
Example JSON response after a lead is successfully deleted from the /leads/delete endpoint.
{
"message": "Lead successfully deleted",
"ID": 96988
}
@atwellpub
atwellpub / wrapper.php
Last active August 29, 2015 14:06
/** * This example seeks to help developers understand how to access the /leads/modify endpoint. */
<?php
/**
* This example seeks to help developers understand how to access the /leads/modify endpoint.
*/
if ( !class_exists( 'Example_API_Calls' )) {
class Example_API_Calls {
@atwellpub
atwellpub / response.json
Last active August 29, 2015 14:06
example json response after successfully completing and Inbound API lead/modify request.
{
"results_count": 1,
"results_per_page": 50,
"max_pages": 0,
"results": {
"96988": {
"ID": 96988,
"lists": {
"113": {
"term_id": 113,
@atwellpub
atwellpub / wrapper.php
Last active August 29, 2015 14:06
/** * This example seeks to help developers understand how to access the /leads/add endpoint. */
<?php
/**
* This example seeks to help developers understand how to access the /leads/add endpoint.
*/
if ( !class_exists( 'Example_API_Calls' )) {
class Example_API_Calls {
@atwellpub
atwellpub / response.json
Last active August 29, 2015 14:06
Example JSON response after successfully adding a lead using the /leads/add endpoint
{
"results_count": 1,
"results_per_page": 50,
"max_pages": 0,
"results": {
"96988": {
"ID": 96988,
"lists": {
"110": {
"term_id": 110,
@atwellpub
atwellpub / response.json
Last active August 29, 2015 14:06
Example Inbound API JSON Result: /leads/
{
"results_count": "800",
"results_per_page": "5",
"max_pages": 160,
"results": {
"96987": {
"ID": 96987,
"lists": {
"110": {
"term_id": 110,
@atwellpub
atwellpub / wrapper.php
Last active September 1, 2020 20:04
Inbound API PHP wrapper examples. /leads/
<?php
/* This example seeks to help developers understand how to access the /leads/ endpoint.
*
*/
if ( !class_exists( 'Example_API_Calls' )) {
class Example_API_Calls {
@atwellpub
atwellpub / functions.php
Last active August 29, 2015 14:06
Example on how to edit email header data before a new lead notification is sent.
<?php
add_filter( ‘inbound_lead_notification_email_headers’ , ‘some_function’ );
function some_function( $headers ) {
$headers = "From: Custom From Name <[email protected]>\r\n";
return $headers;
}
@atwellpub
atwellpub / cta.reveal-variation.js
Created September 5, 2014 17:43
possible fix for delayed load
/* Record Impressions For Each Variation in CTA Object
* @param JSON ctas : a json string of {'cta':'vid'}
*/
function wp_cta_record_impressions(ctas) {
/* Add Impressions to loaded varations*/
jQuery.ajax({
type: 'POST',
url: cta_reveal.admin_url,
@atwellpub
atwellpub / functions.php
Last active August 29, 2015 14:06
Possible woocommerce + landing pages compatibility fix. Add this to your theme's functions.php file
<?php
/* Remove all tracking classes from cart page */
add_action('wp_footer' , 'inbound_remove_cart_tracking_class' );
/**
* Removes tracking classes from forms containing the name 'proceeed'
*/
function inbound_remove_cart_tracking_class() {
?>