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

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


Description Description


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.





Permalink: