BDB_ACTIVITYSTRM::define_trigger()

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


Source Source

File: src/integrations/buddyboss/triggers/bdb-activitystrm.php

	public function define_trigger() {



		$bp_users_args = array(
			'uo_include_any' => true,
		);

		$trigger = array(
			'author'              => Automator()->get_author_name(),
			'support_link'        => Automator()->get_author_support_link( $this->trigger_code, 'integration/buddyboss/' ),
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			/* translators: Logged-in trigger - BuddyPress */
			'sentence'            => sprintf( esc_attr__( '{{A user:%1$s}} posts activity to their stream', 'uncanny-automator' ), $this->trigger_meta ),
			/* translators: Logged-in trigger - BuddyPress */
			'select_option_name'  => esc_attr__( '{{A user}} posts activity to their stream', 'uncanny-automator' ),
			'action'              => 'bp_activity_posted_update',
			'priority'            => 10,
			'accepted_args'       => 3,
			'validation_function' => array( $this, 'bp_activity_posted_update' ),
			'options'             => [
				Automator()->helpers->recipe->buddyboss->options->all_buddyboss_users( null, 'BDBUSERS', $bp_users_args ),
			],
		);

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

		return;
	}