AUTONAMI_TOKENS::contact_tokens( mixed $tokens, $trigger_code )
Method contact_tokens
Parameters Parameters
- $tokens
-
(Required)
- $identifier
-
(Required)
Return Return
(void)
Source Source
File: src/integrations/autonami/tokens/autonami-tokens.php
public function contact_tokens( $tokens, $trigger_code ) { $prefix = __( 'User', 'uncanny-automator' ); if ( $this->is_userless( $trigger_code ) ) { $prefix = __( 'Contact', 'uncanny-automator' ); } $contact_tokens = array( array( 'tokenId' => 'CONTACT_TAGS', /* translators: 1. User or Contact */ 'tokenName' => sprintf( __( "%s's tags", 'uncanny-automator' ), $prefix ), 'tokenType' => 'text', ), array( 'tokenId' => 'CONTACT_LISTS', /* translators: 1. User or Contact */ 'tokenName' => sprintf( __( "%s's lists", 'uncanny-automator' ), $prefix ), 'tokenType' => 'text', ), array( 'tokenId' => 'CONTACT_STATUS', /* translators: 1. User or Contact */ 'tokenName' => sprintf( __( "%s's status", 'uncanny-automator' ), $prefix ), 'tokenType' => 'text', ), array( 'tokenId' => 'CONTACT_STATUS_ID', /* translators: 1. User or Contact */ 'tokenName' => sprintf( __( "%s's status ID", 'uncanny-automator' ), $prefix ), 'tokenType' => 'text', ), ); foreach ( $contact_tokens as &$token ) { $token['tokenIdentifier'] = $trigger_code; } return array_merge( $tokens, $contact_tokens ); }
Expand full source code Collapse full source code View on Github