Actionify_Triggers::cached_actionify_triggers( $actionified_triggers )


Parameters Parameters

$actionified_triggers

(Required)


Source Source

File: src/core/classes/class-actionify-triggers.php

	public function cached_actionify_triggers( $actionified_triggers ) {
		if ( empty( $actionified_triggers ) ) {
			$this->actionify_triggers( true );
		}

		foreach ( $actionified_triggers as $data ) {
			$trigger_actions             = $data['trigger_actions'];
			$trigger_validation_function = $data['trigger_validation_function'];
			$trigger_priority            = $data['trigger_priority'];
			$trigger_accepted_args       = $data['trigger_accepted_args'];

			if ( is_array( $trigger_actions ) ) {
				foreach ( $trigger_actions as $trigger_action ) {
					add_action( $trigger_action, $trigger_validation_function, $trigger_priority, $trigger_accepted_args );
				}
			} else {
				add_action( $trigger_actions, $trigger_validation_function, $trigger_priority, $trigger_accepted_args );
			}
		}

	}