GTT_UNREGISTERUSER::define_action()

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


Source Source

File: src/integrations/gototraining/actions/gtt-unregisteruser.php

	public function define_action() {

		$action = array(
			'author'             => Automator()->get_author_name( $this->action_code ),
			'support_link'       => Automator()->get_author_support_link( $this->action_code, 'knowledge-base/gototraining/' ),
			'integration'        => self::$integration,
			'code'               => $this->action_code,
			'sentence'           => sprintf(
				/* translators: Action sentence. */
				__( 'Remove the user from {{a training session:%1$s}}', 'uncanny-automator' ),
				$this->action_meta
			),
			'select_option_name' => __( 'Remove the user from {{a training session}}', 'uncanny-automator' ),
			'priority'           => 10,
			'accepted_args'      => 1,
			'execution_function' => array( $this, 'gtt_unregister_user' ),
			'options_callback'   => array( $this, 'load_options' ),
		);

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