PeepSo_USERUPDATESAVATAR::define_trigger()

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


Source Source

File: src/integrations/peepso/triggers/peepso-userupdatesavatar.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/peepso/' ),
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			'meta'                => $this->trigger_meta,
			/* translators: Logged-in trigger - PeepSo Core */
			'sentence'            => __( 'A user updates their avatar', 'uncanny-automator-pro' ),
			/* translators: Logged-in trigger - PeepSo Core */
			'select_option_name'  => __( 'A user updates their avatar', 'uncanny-automator-pro' ),
			'action'              => 'peepso_user_after_change_avatar',
			'priority'            => 10,
			'accepted_args'       => 4,
			'validation_function' => array( $this, 'avatar_update' ),
			'options_callback'    => array( $this, 'load_options' ),
		);

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