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: ''
Return Return
(array|mixed)
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.15.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: