BP_USERUPDATEAVATAR::define_trigger()

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


Source Source

File: src/integrations/buddypress/triggers/bp-userupdateavatar.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/buddypress/' ),
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			'meta'                => $this->trigger_meta,
			/* translators: Logged-in trigger - BuddyPress */
			'sentence'            => esc_attr__( 'A user updates their avatar', 'uncanny-automator' ),
			/* translators: Logged-in trigger - BuddyPress */
			'select_option_name'  => esc_attr__( 'A user updates their avatar', 'uncanny-automator' ),
			'action'              => 'xprofile_avatar_uploaded',
			'priority'            => 10,
			'accepted_args'       => 3,
			'validation_function' => array( $this, 'bp_user_updated_avatar' ),
			'options'             => array(),
		);

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