Uoa_Tokens::possible_anon_recipe_tokens( array $tokens = array(), array $args = array() )


Parameters Parameters

$tokens

(Optional)

Default value: array()

$args

(Optional)

Default value: array()


Top ↑

Return Return

(array)


Source Source

File: src/integrations/uncanny-automator/tokens/uoa-tokens.php

	public function possible_anon_recipe_tokens( $tokens = array(), $args = array() ) {

		$trigger_integration = $args['integration'];
		$trigger_meta        = $args['meta'];

		$new_tokens = [
			[
				'tokenId'         => $trigger_meta,
				'tokenName'       => esc_attr__( 'User ID', 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => 'UOARECIPES_user_id',
			],
			[
				'tokenId'         => $trigger_meta,
				'tokenName'       => esc_attr__( 'Username', 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => 'UOARECIPES_username',
			],
			[
				'tokenId'         => $trigger_meta,
				'tokenName'       => esc_attr__( 'User email', 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => 'UOARECIPES_user_email',
			],
			[
				'tokenId'         => $trigger_meta,
				'tokenName'       => esc_attr__( 'Recipe ID', 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => 'UOARECIPES_recipe_id',
			],
			[
				'tokenId'         => $trigger_meta,
				'tokenName'       => esc_attr__( 'Recipe title', 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => 'UOARECIPES_recipe_title',
			],
			[
				'tokenId'         => $trigger_meta,
				'tokenName'       => esc_attr__( 'Recipe edit link', 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => 'UOARECIPES_recipe_edit_link',
			],
			[
				'tokenId'         => $trigger_meta,
				'tokenName'       => esc_attr__( 'Recipe log URL', 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => 'UOARECIPES_recipe_log_url',
			],
			[
				'tokenId'         => $trigger_meta,
				'tokenName'       => esc_attr__( 'Action log URL', 'uncanny-automator' ),
				'tokenType'       => 'text',
				'tokenIdentifier' => 'UOARECIPES_action_log_url',
			],
		];

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

		return $tokens;
	}