LLMS_Data::get_data( string $dataset, string $format = 'array' )

Get the data data


Parameters Parameters

$dataset

(string) (Required) Dataset to retrieve data for [tracker|system_report].

$format

(string) (Optional) Data return format (unused for unrecalled reasons).

Default value: 'array'


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.data.php

	public static function get_data( $dataset, $format = 'array' ) {

		$data = array();

		// Add admin email for tracker requests.
		if ( 'tracker' === $dataset ) {
			$data['email'] = apply_filters( 'llms_get_data_admin_email', get_option( 'admin_email' ) );
		}

		// General data.
		$data['url'] = home_url();

		// Wp info.
		$data['wordpress'] = self::get_wp_data();

		// Llms settings.
		$data['settings'] = self::get_llms_settings();

		if ( 'system_report' === $dataset ) {
			// Constants.
			$data['constants'] = self::get_constants_data();
		}

		// Gateways.
		$data['gateways'] = self::get_gateway_data();

		// Server info.
		$data['server'] = self::get_server_data();

		// Browser / os.
		$data['browser'] = self::get_browser_data();

		// Theme info.
		$data['theme'] = self::get_theme_data();

		// Plugin info.
		$data['plugins'] = self::get_plugin_data();

		if ( 'tracker' === $dataset ) {

			// Published content type counts.
			$data['post_counts'] = self::get_post_type_counts();

			// User data.
			$data['user_counts'] = self::get_user_counts();

			// Count student engagements.
			$data['engagement_counts'] = self::get_engagement_counts();

			// Order data.
			$data['order_counts'] = self::get_order_counts();

		}

		$data['integrations'] = self::get_integrations_data();

		$data['template_overrides'] = self::get_templates_data();

		return $data;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.13.0 Added constant data.
3.17.0 Added browser/os data section.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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