FCRM_ADD_USER_TO_LIST::define_trigger()

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


Source Source

File: src/integrations/fluent-crm/triggers/fcrm-add-user-to-list.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 user is added to {{a list:%1$s}}', 'Fluent Forms', 'uncanny-automator' ), $this->trigger_meta ),
			/* translators: Logged-in trigger - Fluent Forms */
			'select_option_name'  => esc_attr_x( 'A user is added to {{a list}}', 'Fluent Forms', 'uncanny-automator' ),
			'action'              => 'fluentcrm_contact_added_to_lists',
			'priority'            => 20,
			'accepted_args'       => 2,
			'validation_function' => array( $this, 'contact_added_to_lists' ),
			'options'             => [
				Automator()->helpers->recipe->fluent_crm->options->fluent_crm_lists(),
			],
		);

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

		return;
	}