UOG_REGISTERED_WITH_GROUPKEY::define_trigger()

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


Source Source

File: src/integrations/uncanny-groups/triggers/uog-registered-with-groupkey.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/uncanny-groups/' ),
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			'meta'                => $this->trigger_meta,
			/* translators: Logged-in trigger - Uncanny Groups */
			'sentence'            => sprintf( esc_attr__( 'A user is registered using {{a group:%1$s}} key', 'uncanny-automator' ), $this->trigger_meta ),
			/* translators: Logged-in trigger - Uncanny Groups */
			'select_option_name'  => esc_attr__( 'A user is registered using {{a group}} key', 'uncanny-automator' ),
			'action'              => 'ulgm_user_registered',
			'priority'            => 20,
			'accepted_args'       => 2,
			'validation_function' => array( $this, 'user_registered' ),
			'options_callback'    => array( $this, 'load_options' ),
		);

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