Overview

Packages

  • ACF
  • Automation
    • Actions
    • Activation
    • LeadProfile
    • Menus
    • Queries
    • Rules
    • Triggers
  • CTA
    • Activation
    • AJAXListeners
    • Cloning
    • Core
    • Display
    • EditPage
    • Enqueues
    • GPLSettings
    • LeadsProfile
    • Loading
    • Menus
    • Notices
    • PlacementMetabox
    • PostType
    • Templates
    • Tracking
    • Variations
    • YOAST
  • InboundPro
    • Activation
    • AdminAJAX
    • AutoLoading
    • Cron
    • DataInterface
    • FieldMapping
    • Funnels
    • InboundNowAPI
    • Installer
    • LeadStatuses
    • Menus
    • Notifications
    • Ouath
    • Reports
    • Settings
    • Tracking
    • Translations
    • Updates
  • LandingPages
    • Activation
    • DataInterfaces
    • Management
    • Menus
    • NeedsAttention
    • Notices
    • Sidebars
    • Templates
    • Tracking
    • Variations
    • WelcomeScreen
    • Widgets
  • Leads
    • Activation
    • Akismet
    • BranchControl
    • BulkActions
    • Dashboard
    • Management
    • Notifications
    • Settings
    • Tracking
    • UserProfile
    • WPLogin
  • Mailer
    • Activation
    • Admin
    • ClickTracking
    • DataInterface
    • InboundForms
    • Leads
    • Management
    • Notifications
    • Scheduling
    • Sending
    • Settings
    • ShortcodesAndTokens
    • SparkPost
    • Templates
    • Unsubscribes
    • Variations
    • YoastSEO
  • None
  • Shared
    • APIs
    • CPT
    • DatabaseRoutines
    • DebugTricks
    • DoubleOptin
    • EventManagement
    • FieldMapping
    • InboundForms
    • LeadSorage
    • MarketingButton
    • Menus
    • Notifications
    • Shortcodes
    • ShortcodesAndTokens
    • StandAloneLicensing
    • Tracking
    • VisualEditor
  • xDepreciated

Classes

  • Inbound_API
  • Inbound_API_Keys_Generation
  • Inbound_API_Keys_Table

Functions

  • load_Inbound_API_Keys_Generation
  • Overview
  • Package
  • Class

Class Inbound_API

Inbound_API Class

Renders API returns as a JSON array

Package: Shared\APIs
Located at core/shared/classes/class.inbound-api.php
Methods summary
public
# __construct( )

Initialize the Inbound Leads API

Initialize the Inbound Leads API

public static
# add_endpoint( array $rewrite_rules )

Registers a new rewrite endpoint for accessing the API

Registers a new rewrite endpoint for accessing the API

Parameters

$rewrite_rules
WordPress Rewrite Rules
public static boolean
# get_user( string $key = '' )

Retrieve the user ID based on the public key provided

Retrieve the user ID based on the public key provided

Parameters

$key
Public Key

Returns

boolean
if user ID is found, false otherwise
public static array|mixed
# get_args_from_token( $token )

Get tracked link arguments given a storage token

Get tracked link arguments given a storage token

Parameters

$token

Returns

array|mixed
public static
# process_api_query( )

Listens for the API and then processes the API requests

Listens for the API and then processes the API requests

public static string
# get_query_type( )

Determines the kind of query requested and also ensures it is a valid query

Determines the kind of query requested and also ensures it is a valid query

Returns

string
$query type of query to run
public static integer
# get_paged( )

Get page number

Get page number

Returns

integer
$_REQUEST['page'] if page number returned (default: 1)
public static integer
# get_results_per_page( )

Get number of results per page to return uses REQUEST but falls back on self::$results_per_page

Get number of results per page to return uses REQUEST but falls back on self::$results_per_page

Returns

integer
public static array
# get_dates( array $args = array() )

Sets up the dates used to retrieve leads

Sets up the dates used to retrieve leads

Parameters

$args
Arguments to override defaults

Returns

array
$dates

Since

1.5.1
public static array
# get_output( )

Retrieve the output data

Retrieve the output data

Returns

array
public static
# output( integer $status_code = 200 )

Output Query in either JSON/XML. The query data is outputted as JSON by default

Output Query in either JSON/XML. The query data is outputted as JSON by default

Parameters

$status_code
public static
# leads_get( ARRAY $params = array() )

Query designed to return leads based on conditions defined by user.

Query designed to return leads based on conditions defined by user.

Parameters

$params
key/value pairs that will direct the building of WP_Query, optional
public static
# leads_prepare_defaults( ARRAY $params )

Sets the API defaults for the /leads/(get) endpoint

Sets the API defaults for the /leads/(get) endpoint

Parameters

$params

Returns

ARRAY $params
public static
# leads_prepare_tax_query( ARRAY $args, ARRAY $params )

Builds a tax_query ARRAY from included parameters if applicable. Used for tag searches and lead list searches.

Builds a tax_query ARRAY from included parameters if applicable. Used for tag searches and lead list searches.

Parameters

$args
arguments for WP_Query
$params
includes param key/value pairs submitted to the api

Returns

ARRAY $args
public static
# get_tag_ids( ARRAY $tags )

Get tag ids from given names

Get tag ids from given names

Parameters

$tags
contains array of tag names

Returns

ARRAY $tag_ids contains array of tag term ids
public static ARRAY
# prepare_lead_results( OBJECT $results )

Converts WP_Query object into array and imports additional lead data

Converts WP_Query object into array and imports additional lead data

Parameters

$results
WP_Query results

Returns

ARRAY
$leads updated array of results
public static
# leads_add( ARRAY $params = array() )

Adds a lead to the wp-lead custom post type

Adds a lead to the wp-lead custom post type

Parameters

$params
key/value pairs that will direct the building of WP_Query, optional
public static
# leads_update( ARRAY $params = array() )

Updates a Lead profile

Updates a Lead profile

Parameters

$params
key/value pairs that will assist database queries
public static
# leads_delete( ARRAY $params = array() )

Permanently deletes a lead profile

Permanently deletes a lead profile

Parameters

$params
key/value pairs
public static INT
# leads_get_id_from_email( STRING $email )

Get lead ID from lead email address

Get lead ID from lead email address

Parameters

$email
lead email address

Returns

INT
$id
public static
# lists_get( )

Gets all lead lists

Gets all lead lists

public static
# lists_add( $params = array() )

Create a new lead list

Create a new lead list

public static ARRAY
# lists_update( $params = array() )

Updates a list's data

Updates a list's data

Returns

ARRAY
public static
# lists_delete( $params = array() )

Deletes a lead list

Deletes a lead list

public static
# fieldmap_get( )

Gets an array of mappable lead meta keys with their labels

Gets an array of mappable lead meta keys with their labels

public static
# generate_token( length $min = 7, $max = 11 )

Generates random token

Generates random token

Parameters

$min
$max
public static
# analytics_get_tracking_code( ARRAY $args = array() )

Stores tracked link data into wp_inbound_tracked_links table

Stores tracked link data into wp_inbound_tracked_links table

Parameters

$args
passed arguments
public static
# analytics_track_links( $params = array() )

Generate tracked link

Generate tracked link

public static
# process_tracked_link( )

Listens for the tracked links and update lead event profile

Listens for the tracked links and update lead event profile

Constants summary
string VERSION

API Version

API Version

# '1'
Properties summary
public static boolean $pretty_print

Pretty Print?

Pretty Print?

Since

1.5
# false
public static boolean $log_requests

Log API requests?

Log API requests?

Since

1.5
# true
public static boolean $is_valid_request

Is this a valid request?

Is this a valid request?

Since

1.5
# false
public static integer $user_id

User ID Performing the API Request

User ID Performing the API Request

Since

1.5.1
# 0
public static object $stats

Instance of EDD Stats class

Instance of EDD Stats class

#
public static array $data

Response data to return

Response data to return

# array()
public static boolean $override
# true
public static integer $results_per_page
# 50
public static string $tracking_endpoint
# 'inbound'
Inbound Pro Plugin - PHP Codex API documentation generated by ApiGen