LLMS_Integration_BBPress::engagement_query_args( array $query_args, string $action, array $orig_args )

Parse action arguments for bbPress engagements and pass them back to the LLMS Engagements handler


Description Description


Parameters Parameters

$query_args

(array) (Required) query args for handler

$action

(string) (Required) triggering action name

$orig_args

(array) (Required) original arguments from the action (indexed array)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/integrations/class.llms.integration.bbpress.php

	public function engagement_query_args( $query_args, $action, $orig_args ) {

		if ( in_array( $action, array( 'bbp_new_reply', 'bbp_new_topic' ) ) ) {

			$query_args['trigger_type'] = $action;
			$query_args['related_post_id'] = '';

			if ( 'bbp_new_reply' === $action ) {

				$query_args['user_id'] = $orig_args[4]; // $reply_author

			} elseif ( 'bbp_new_topic' === $action ) {

				$query_args['user_id'] = $orig_args[3]; // $topic_author

			}
		}

		return $query_args;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.12.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.





Permalink: