atpCustom Reference

sourcing_extension extends abstract_extension
in package

Extension: sourcing_extension - marketing source code assignment - ATP Custom Plugin for WordPress

Tags
category

WordPress Plugin

author

Kevin Burkholder KBurkholder@EarthAsylum.com

copyright

Copyright (c) 2022 American Telecast Products

version
4.x
see
https://eacDoojigger.earthasylum.com/phpdoc/
used-by

\EarthAsylumConsulting\abstract_core

uses
abstract_extension

Table of Contents

VERSION  = '24.0503.1'
$SearchCodes  : array<string|int, mixed>
$SourceCodes  : array<string|int, mixed>
__construct()  : void
constructor method
addActionsAndFilters()  : void
Add filters and actions - called from main plugin
defaultSourcing()  : void
default sourcing (even if disabled)
doSourcing()  : string
doSourcing - setup and assign sourcing - executed on page load
get_sourcing()  : mixed
get a sourcing value filter {classname}_get_sourcing get a sourcing value
getSourcing()  : mixed
get a sourcing value
getSourcingFiles()  : array<string|int, mixed>
get an array of available sourcing files
getVariable()  : mixed
get a sourcing value filter {classname}_get_variable get a sourcing value
initialize()  : void
initialize method - called from main plugin
isNewSession()  : bool
is a new session (based on session extension filter)
loadSourcingFile()  : void
load the sourcing array(s)
set_sourcing()  : mixed
set a sourcing value filter {classname}_set_sourcing get a sourcing value
setSourcing()  : mixed
set a sourcing value
sourcing_debugging()  : array<string|int, mixed>
Get the sourcing array for debugging
sourcing_styles()  : mixed
output source specific styles

Constants

Properties

$SearchCodes

public array<string|int, mixed> $SearchCodes = array()

search code array [] = array( 'Domain' => array('search','yahoo'), -- referrer host name must include these 'Contains' => array('yahoo','search'), -- referrer string must include these 'Exclude' => array('mail'), -- referrer string cannot include these 'URL' => array( 'Contains' => array('key=google'), -- url string must include these 'Exclude' => array('key=google'), -- url string cannot include these ), 'Flags' => array( 'Override' =>true, -- will override $key parameter 'Query' =>true, -- require a query string ), );

$SourceCodes

public array<string|int, mixed> $SourceCodes = array()

source code array 'urlkey' => array( 'urlkey' => 'default' -- key= parameter 'Description' => '...', -- description 'Medium' => '', -- medium (will be assigned) 'AffiliateID' => '', -- affiliate id (triggers cookie set) 'ProfitCenter' => 'profit center', -- profit center 'ParentSource' => 'parent source', -- parent source 'ChildSource' => 'child source', -- child source 'Referrer' => array( 'Contains' => array('google'), -- referrer string must include one of these 'Exclude' => array('google'), -- referrer string cannot include any of these ) OfferHeader => ## -- Elementor template id OfferBanner => ## -- Elementor template id );

Methods

__construct()

constructor method

public __construct(object $plugin) : void
Parameters
$plugin : object

main plugin object

Return values
void

addActionsAndFilters()

Add filters and actions - called from main plugin

public addActionsAndFilters() : void
Return values
void

defaultSourcing()

default sourcing (even if disabled)

public defaultSourcing() : void
Return values
void

doSourcing()

doSourcing - setup and assign sourcing - executed on page load

public doSourcing(string $keyValue, string $keyName) : string
Parameters
$keyValue : string
  • the value of the url parameter
$keyName : string
  • the name of the url parameter
Return values
string

the assigned keyid value

get_sourcing()

get a sourcing value filter {classname}_get_sourcing get a sourcing value

public get_sourcing([mixed $default = null ][, mixed $varName = null ]) : mixed
Parameters
$default : mixed = null
$varName : mixed = null
Return values
mixed
  • the value or null

getSourcing()

get a sourcing value

public getSourcing([mixed $varName = null ][, mixed $default = null ]) : mixed
Parameters
$varName : mixed = null
$default : mixed = null
Return values
mixed
  • the value or null

getSourcingFiles()

get an array of available sourcing files

public getSourcingFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>

filepath => filemtime

getVariable()

get a sourcing value filter {classname}_get_variable get a sourcing value

public getVariable(mixed $default, mixed $varName) : mixed
Parameters
$default : mixed
$varName : mixed
Return values
mixed
  • the value or null

initialize()

initialize method - called from main plugin

public initialize() : void
Return values
void

isNewSession()

is a new session (based on session extension filter)

public isNewSession() : bool
Return values
bool

loadSourcingFile()

load the sourcing array(s)

public loadSourcingFile(string $file) : void
Parameters
$file : string
  • the file pathname to load
Return values
void

set_sourcing()

set a sourcing value filter {classname}_set_sourcing get a sourcing value

public set_sourcing(mixed $varValue, mixed $varName) : mixed
Parameters
$varValue : mixed
$varName : mixed
Return values
mixed
  • the value or null

setSourcing()

set a sourcing value

public setSourcing(mixed $varName, mixed $varValue) : mixed
Parameters
$varName : mixed
$varValue : mixed
Return values
mixed
  • the value

sourcing_debugging()

Get the sourcing array for debugging

public sourcing_debugging(mixed $debugging_array) : array<string|int, mixed>
Parameters
$debugging_array : mixed
Return values
array<string|int, mixed>

extended array with [ extension_name => [key=>value array] ]

sourcing_styles()

output source specific styles

public sourcing_styles() : mixed
Return values
mixed

Search results