BB_NEWTOPIC::bbp_new_topic( $topic_id,  $forum_id,  $anonymous_data,  $topic_author )

Validation function when the trigger action is hit


Parameters Parameters

$topic_id

(Required)

$forum_id

(Required)

$anonymous_data

(Required)

$topic_author

(Required)


Source Source

File: src/integrations/bbpress/triggers/bb-newtopic.php

	public function bbp_new_topic( $topic_id, $forum_id, $anonymous_data, $topic_author ) {


		$user_id = get_current_user_id();

		$args = [
			'code'    => $this->trigger_code,
			'meta'    => $this->trigger_meta,
			'post_id' => $forum_id,
			'user_id' => $user_id,
		];

		Automator()->maybe_add_trigger_entry( $args );
	}