Gravity_Forms\Gravity_Forms\Telemetry\GF_Telemetry_Data
Class GF_Telemetry_Data
Base class for telemetry data.
Source: includes/telemetry/class-gf-telemetry-data.php:15
Details
- Kind:
class - Namespace:
Gravity_Forms\Gravity_Forms\Telemetry
Properties
| Property | Type | Description |
|---|---|---|
$data | array | Data to be sent. |
$key | string | Unique identifier for this data object. |
$data_collection | bool | Whether data collection is allowed. |
Methods
| Method | Description |
|---|---|
is_data_collection_allowed() | Determine if the user has allowed data collection. |
get_data() | Get the current telemetry data. |
save_data() | Save telemetry data. |
take_snapshot() | Take a snapshot of the current site data. |
send_data() | Send data to the telemetry endpoint. |
Method Reference
is_data_collection_allowed()
public function is_data_collection_allowed()
Determine if the user has allowed data collection.
Returns
false|mixed|null
Since: 2.8.3
Source: includes/telemetry/class-gf-telemetry-data.php:48
get_data()
public static function get_data()
Get the current telemetry data.
Returns
array
Since: 2.8
Source: includes/telemetry/class-gf-telemetry-data.php:59
save_data()
public static function save_data( GF_Telemetry_Data $data )
Save telemetry data.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$data | GF_Telemetry_Data | The data to save. |
Returns
void
Since: 2.8
Source: includes/telemetry/class-gf-telemetry-data.php:74
take_snapshot()
public static function take_snapshot()
Take a snapshot of the current site data.
Returns
void
Since: 2.8
Source: includes/telemetry/class-gf-telemetry-data.php:100
send_data()
public static function send_data( $entries )
Send data to the telemetry endpoint.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entries | array | The data to send. |
Returns
array| WP_Error
Since: 2.8
Source: includes/telemetry/class-gf-telemetry-data.php:114