Skip to main content

GF_Personal_Data

Handles Integration with the WordPress personal data export and erase tools.

Since: 2.4 (Class GF_Personal_Data)

Source: includes/class-personal-data.php:14

Details

  • Kind: class
  • Namespace: (global)

Methods

MethodDescription
form_settings()Renders the form settings.
settings_columns()Renders a Personal Data columns table field.
process_form_settings()Saves the form settings.
initialize_settings_renderer()Initializes the Settings renderer at the beginning of page load.
get_form()Returns the form array for use in the form settings.
get_columns()Returns an assoiative array of the database columns that may contain personal data.
get_custom_items()Returns an array with the custom personal data items configurations.
get_forms()Returns an associative array of all the form metas with the form ID as the key.
get_entries()Returns all the entries across all forms for the specified email address.
data_exporter()Exports personal data specified in the form settings.
get_draft_submissions_export_items()Returns the export items for draft submissions.
data_eraser()Erases personal data specified in the form settings.
get_draft_submissions()Returns the draft submissions (save and continue) for the given email address.
erase_draft_submissions_data()Erases the data in the draft submissions.
cron_task()Deletes and trashes entries according to the retention policy in each of the form settings.
log_debug()Writes a message to the debug log
flush_current_forms()Flushes the forms

Method Reference

form_settings()

public static function form_settings( $form_id )

Renders the form settings.

Parameters

NameTypeDefaultDescription
$form_id

Since: 2.4

Source: includes/class-personal-data.php:50

settings_columns()

public static function settings_columns( $props=[], $echo=true )

Renders a Personal Data columns table field.

Parameters

NameTypeDefaultDescription
$propsarray[]Field properties.
$echobooltrueOutput the field markup directly.

Returns

  • string

Since: 2.5

Source: includes/class-personal-data.php:287

process_form_settings()

public static function process_form_settings( $values )

Saves the form settings.

Parameters

NameTypeDefaultDescription
$valuesarraySubmitted settings values.

Since: 2.4

Source: includes/class-personal-data.php:507

initialize_settings_renderer()

public static function initialize_settings_renderer()

Initializes the Settings renderer at the beginning of page load.

Source: includes/class-personal-data.php:568

get_form()

public static function get_form( $form_id )

Returns the form array for use in the form settings.

Parameters

NameTypeDefaultDescription
$form_idint

Returns

  • array | mixed

Since: 2.4

Source: includes/class-personal-data.php:667

get_columns()

public static function get_columns()

Returns an assoiative array of the database columns that may contain personal data.

Returns

  • array

Since: 2.4

Source: includes/class-personal-data.php:682

get_custom_items()

public static function get_custom_items( $form )

Returns an array with the custom personal data items configurations.

Parameters

NameTypeDefaultDescription
$formarray

Returns

  • array

Since: 2.4

Source: includes/class-personal-data.php:701

get_forms()

public static function get_forms()

Returns an associative array of all the form metas with the form ID as the key.

Returns

  • array | null

Since: 2.4

Source: includes/class-personal-data.php:750

get_entries()

public static function get_entries( $email_address, $page=1, $limit=50 )

Returns all the entries across all forms for the specified email address.

Parameters

NameTypeDefaultDescription
$email_addressstring
$pageint1
$limitint50

Returns

  • array

Since: 2.4

Source: includes/class-personal-data.php:784

data_exporter()

public static function data_exporter( $email_address, $page=1 )

Exports personal data specified in the form settings.

Parameters

NameTypeDefaultDescription
$email_addressstring
$pageint1

Returns

  • array

Since: 2.4

Source: includes/class-personal-data.php:857

get_draft_submissions_export_items()

public static function get_draft_submissions_export_items( $email_address )

Returns the export items for draft submissions.

Parameters

NameTypeDefaultDescription
$email_address

Returns

  • array

Since: 2.4

Source: includes/class-personal-data.php:966

data_eraser()

public static function data_eraser( $email_address, $page=1 )

Erases personal data specified in the form settings.

Parameters

NameTypeDefaultDescription
$email_addressstring
$pageint1

Returns

  • array

Since: 2.4

Source: includes/class-personal-data.php:1041

get_draft_submissions()

public static function get_draft_submissions( $email_address )

Returns the draft submissions (save and continue) for the given email address.

Parameters

NameTypeDefaultDescription
$email_address

Returns

  • array

Since: 2.4

Source: includes/class-personal-data.php:1185

erase_draft_submissions_data()

public static function erase_draft_submissions_data( $email_address )

Erases the data in the draft submissions.

Parameters

NameTypeDefaultDescription
$email_address

Returns

  • bool

Since: 2.4

Source: includes/class-personal-data.php:1242

cron_task()

public static function cron_task()

Deletes and trashes entries according to the retention policy in each of the form settings.

Since: 2.4

Source: includes/class-personal-data.php:1366

log_debug()

public static function log_debug( $message )

Writes a message to the debug log

Parameters

NameTypeDefaultDescription
$message

Since: 2.4

Source: includes/class-personal-data.php:1488

flush_current_forms()

public static function flush_current_forms()

Flushes the forms

Since: 2.4

Source: includes/class-personal-data.php:1497