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


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' ), true ) ) {

			$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.37.11 Use strict comparison for in_array().
3.12.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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