wp_privacy_personal_data_exporters WordPress Filter Hook
The wp_privacy_personal_data_exporters hook allows you to register personal data exporters for your plugin or theme. A personal data exporter is a function that export personal data associated with a given user ID. This hook is important for complying with the European Union’s General Data Protection Regulation (GDPR), which requires that website operators allow users to export their personal data. To register a personal data exporter, you must first create a function that export personal data associated with a given user ID. This function must then be registered with the wp_privacy_personal_data_exporters hook. Here is an example of a personal data exporter function: function my_plugin_export_personal_data( $user_id ) { // Export personal data associated with $user_id. } Then, you would register this function with the wp_privacy_personal_data_exporters hook like so: add_filter( 'wp_privacy_personal_data_exporters', 'my_plugin_export_personal_data' ); Once registered, your personal data exporter function will be called when a user requests their personal data export.
apply_filters( 'wp_privacy_personal_data_exporters', array $args ) #
Filters the array of exporter callbacks.
Parameters
- $args
(array)An array of callable exporters of personal data. Default empty array.
- '...$0'
(array) Array of personal data exporters.- 'callback'
(callable) Callable exporter function that accepts an email address and a page and returns an array of name => value pairs of personal data. - 'exporter_friendly_name'
(string) Translated user facing friendly name for the exporter.
- 'callback'
- '...$0'
Source
Changelog
Version | Description |
---|---|
4.9.6 | Introduced. |