FCRM_TAG_ADDED_TO_USER::define_trigger()

Define and register the trigger by pushing it into the Automator object


Source Source

File: src/integrations/fluent-crm/triggers/fcrm-tag-added-to-user.php

	public function define_trigger() {



		$trigger = array(
			'author'              => Automator()->get_author_name( $this->trigger_code ),
			'support_link'        => Automator()->get_author_support_link( $this->trigger_code, 'integration/fluentcrm/' ),
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			/* translators: Logged-in trigger - Fluent Forms */
			'sentence'            => sprintf( esc_attr_x( '{{A tag:%1$s}} is added to a user', 'Fluent Forms', 'uncanny-automator' ), $this->trigger_meta ),
			/* translators: Logged-in trigger - Fluent Forms */
			'select_option_name'  => esc_attr_x( '{{A tag}} is added to a user', 'Fluent Forms', 'uncanny-automator' ),
			'action'              => 'fluentcrm_contact_added_to_tags',
			'priority'            => 20,
			'accepted_args'       => 2,
			'validation_function' => array( $this, 'contact_added_to_tags' ),
			'options'             => [
				Automator()->helpers->recipe->fluent_crm->options->fluent_crm_tags(),
			],
		);

		Automator()->register->trigger( $trigger );

		return;
	}