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

  • CTA_Variations
  • Overview
  • Package
  • Class

Class CTA_Variations

Package: CTA\Variations
Located at core/cta/classes/class.cta.variations.php
Methods summary
public
# __construct( )
public static
# load_hooks( )
public static
# add_listeners( )
public static
# delete_variation( INT $cta_id, INT $vid )

Deletes variation for a call to action

Deletes variation for a call to action

Parameters

$cta_id
id of call to action
$vid
id of variation to delete
public static
# pause_variation( INT $cta_id, INT $vid )

Pauses variation for a call to action

Pauses variation for a call to action

Parameters

$cta_id
id of call to action
$vid
id of variation to delete
public static
# play_variation( INT $cta_id, INT $vid )

Activations variation for a call to action

Activations variation for a call to action

Parameters

$cta_id
id of call to action
$vid
id of variation to play
public static
# set_variation_status( INT $cta_id, INT $vid, STRING $status = 'play' )

Sets the variation status to a custom status

Sets the variation status to a custom status

Parameters

$cta_id
id of call to action
$vid
id of variation to delete
$status
custom status
public static
# save_variation_object_data( $cta_id )
public static
# get_variations( INT $cta_id, INT $vid = null )

Returns array of variation data given a call to action id

Returns array of variation data given a call to action id

Parameters

$cta_id
id of call to action
$vid
id of specific variation

Returns

ARRAY of variation data
public static
# get_variation_status( INT $cta_id, INT $vid = null )

Returns the status of a variation given cta_id and vid

Returns the status of a variation given cta_id and vid

Parameters

$cta_id
id of call to action
$vid
variation id of call to action

Returns

STRING status
public static
# get_variation_permalink( INT $cta_id, INT $vid = null )

Returns the permalink of a variation given cta_id and vid

Returns the permalink of a variation given cta_id and vid

Parameters

$cta_id
id of call to action
$vid
variation id of call to action

Returns

STRING permalink
public static
# update_variations( INT $cta_id, variations $variations )

Updates 'wp-cta-variations' meta key with json object

Updates 'wp-cta-variations' meta key with json object

Parameters

$cta_id
id of call to action
$variations
of variation data
public static ARRAY
# get_variation_meta( INT $cta_id, INT $vid )

Returns array of variation specific meta data

Returns array of variation specific meta data

Parameters

$cta_id
ID of call to action
$vid
ID of variation belonging to call to action

Returns

ARRAY
$meta array of variation meta data
public static STRING
# get_variation_notes( INT $cta_id, INT $vid = null )

Gets the call to action variation notes

Gets the call to action variation notes

Parameters

$cta_id
id of call to action
$vid
variation id of call to action variation, will attempt to autodetect if left as null

Returns

STRING
$notes variation notes.
public static STRING
# get_variation_custom_css( INT $cta_id, INT $vid = null )

Gets the call to action variation custom css

Gets the call to action variation custom css

Parameters

$cta_id
id of call to action
$vid
variation id of call to action variation, will attempt to autodetect if left as null

Returns

STRING
$custom_css.
public static STRING
# get_variation_custom_js( INT $cta_id, INT $vid = null )

Gets the call to action variation custom js

Gets the call to action variation custom js

Parameters

$cta_id
id of call to action
$vid
variation id of call to action variation, will attempt to autodetect if left as null

Returns

STRING
$custom_js.
public static
# prepare_input_id( $id, $vid = null )
public static
# get_current_variation_id( )
public static
# get_next_available_variation_id( $cta_id )
public static
# get_current_template( $cta_id, $vid = null )
public static
# get_template_thumbnail( $template )

Returns templat thumbnail

Returns templat thumbnail

public static STRING
# get_screenshot_url( INT $cta_id, INT $vid = null )

Get Screenshot URL for Call to Action preview. If local environment show template thumbnail.

Get Screenshot URL for Call to Action preview. If local environment show template thumbnail.

Parameters

$cta_id
id if of call to action
$vid
id of variation belonging to call to action

Returns

STRING
url of preview
public static STRING
# append_variation_id_to_url( link $link )

Appends current variation id onto a URL

Appends current variation id onto a URL

Parameters

$link
URL that param will be appended onto

Returns

STRING
modified URL.
public static STRING
# vid_to_letter( INT $cta_id, INT $vid )

Discovers which alphabetic letter should be associated with a given cta's variation id.

Discovers which alphabetic letter should be associated with a given cta's variation id.

Parameters

$cta_id
id of call to action
$vid
id of variation belonging to call to action

Returns

STRING
alphebit letter.
public static INT
# get_impressions( INT $cta_id, INT $vid )

Returns impression for given cta and variation id

Returns impression for given cta and variation id

Parameters

$cta_id
id of call to action
$vid
id of variation belonging to call to action

Returns

INT
impression count
public static
# set_impression_count( INT $cta_id, INT $vid, $count )

Manually sets conversion count for given cta id and variation id

Manually sets conversion count for given cta id and variation id

Parameters

$cta_id
id of call to action
$vid
id of variation belonging to call to action
$count
public static INT
# get_conversions( INT $cta_id, INT $vid )

Returns total conversions for given cta and variation id

Returns total conversions for given cta and variation id

Parameters

$cta_id
id of call to action
$vid
id of variation belonging to call to action

Returns

INT
total conversions count
public static INT
# get_clicks( INT $cta_id, INT $vid )

Returns clicks for given cta and variation id

Returns clicks for given cta and variation id

Parameters

$cta_id
id of call to action
$vid
id of variation belonging to call to action

Returns

INT
click count
public static INT
# get_form_submissions( INT $cta_id, INT $vid )

Returns clicks for given cta and variation id

Returns clicks for given cta and variation id

Parameters

$cta_id
id of call to action
$vid
id of variation belonging to call to action

Returns

INT
form submission count
public static INT
# get_conversion_rate( INT $cta_id, INT $vid )

Returns conversion rate for given cta and variation id

Returns conversion rate for given cta and variation id

Parameters

$cta_id
id of call to action
$vid
id of variation belonging to call to action

Returns

INT
conversion rate
public static
# set_conversion_count( INT $cta_id, INT $vid, $count )

Manually sets conversion count for given cta id and variation id

Manually sets conversion count for given cta id and variation id

Parameters

$cta_id
id of call to action
$vid
id of variation belonging to call to action
$count
Inbound Pro Plugin - PHP Codex API documentation generated by ApiGen