LLMS_Events::get_client_settings()

Retrieves an array of client settings used to initialize the JS Tracking instance on the frontend.


Return Return

(array)


Top ↑

Source Source

File: includes/class-llms-events.php

	public function get_client_settings() {

		$events = ! $this->should_track_client_events() ? array() : array_keys( array_filter( $this->get_registered_events() ) );

		/**
		 * Filter client-side tracking settings
		 *
		 * @since 3.36.0
		 *
		 * @param array $settings {
		 *     Hash of client-side settings.
		 *
		 *     @type string $nonce Nonce used to verify client-side events.
		 *     @type string[] $events Array of events that should be tracked.
		 * }
		 */
		return apply_filters(
			'llms_events_get_client_settings',
			array(
				'nonce'  => wp_create_nonce( 'llms-tracking' ),
				'events' => $events,
			)
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.36.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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