LLMS_Abstract_Processor::get_data( string $key = null, string $default = '' )

Retrieve data for the current processor that can be used in future processes


Parameters Parameters

$key

(string) (Optional) If set, return a specific piece of data rather than the whole array.

Default value: null

$default

(string) (Optional) When returning a specific piece of data, allows a default value to be passed.

Default value: ''


Top ↑

Return Return

(array|mixed)


Top ↑

Source Source

File: includes/abstracts/llms.abstract.processor.php

	public function get_data( $key = null, $default = '' ) {

		// Get the array of processor data.
		$all_data = get_option( 'llms_processor_data', array() );

		// Get data for current processor.
		$data = isset( $all_data[ $this->id ] ) ? $all_data[ $this->id ] : array();

		// Get a specific piece of data.
		if ( $key ) {
			return isset( $data[ $key ] ) ? $data[ $key ] : $default;
		}

		// Return all the data.
		return $data;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.15.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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