Wp_Tokens::wp_possible_tokens( array $tokens = array(), array $args = array() )


Parameters Parameters

$tokens

(array) (Optional)

Default value: array()

$args

(array) (Optional)

Default value: array()


Top ↑

Return Return

(array)


Source Source

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

	public function wp_possible_tokens( $tokens = array(), $args = array() ) {
		$trigger_integration = $args['integration'];
		$trigger_meta        = $args['meta'];

		$fields = [
			[
				'tokenId'         => 'authorname',
				'tokenName'       => __( "Post's Author Name", 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => $trigger_meta,
			],
			[
				'tokenId'         => 'authoremail',
				'tokenName'       => __( "Post's Author Email", 'uncanny_automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => $trigger_meta,
			],
		];

		$tokens = array_merge( $tokens, $fields );

		return $tokens;
	}