AUTONAMI_TOKENS::additional_contact_tokens( mixed $tokens,  $trigger_code )

Method additional_contact_tokens


Parameters Parameters

$tokens

(Required)

$identifier

(Required)


Top ↑

Return Return

(void)


Source Source

File: src/integrations/autonami/tokens/autonami-tokens.php

	public function additional_contact_tokens( $tokens, $trigger_code ) {

		$contact_tokens = array(
			array(
				'tokenId'   => 'CONTACT_ID',
				'tokenName' => __( "Contact's ID", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_EMAIL',
				'tokenName' => __( "Contact's email address", 'uncanny-automator' ),
				'tokenType' => 'email',
			),
			array(
				'tokenId'   => 'CONTACT_FNAME',
				'tokenName' => __( "Contact's first name", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_LNAME',
				'tokenName' => __( "Contact's last name", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_PHONE',
				'tokenName' => __( "Contact's phone number", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_COUNTRY',
				'tokenName' => __( "Contact's country", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_STATE',
				'tokenName' => __( "Contact's state", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_TIMEZONE',
				'tokenName' => __( "Contact's timezone", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_TYPE',
				'tokenName' => __( "Contact's type", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_SOURCE',
				'tokenName' => __( "Contact's source", 'uncanny-automator' ),
				'tokenType' => 'text',
			),
			array(
				'tokenId'   => 'CONTACT_CREATION_DATE',
				'tokenName' => __( "Contact's creation date", 'uncanny-automator' ),
				'tokenType' => 'date',
			),
			array(
				'tokenId'   => 'CONTACT_MODIFIED_DATE',
				'tokenName' => __( "Contact's last modified date", 'uncanny-automator' ),
				'tokenType' => 'date',
			),
		);

		foreach ( $contact_tokens as &$token ) {
			$token['tokenIdentifier'] = $trigger_code;
		}

		return array_merge( $tokens, $contact_tokens );
	}