wp_register_comment_personal_data_eraser() WordPress Function
The wp_register_comment_personal_data_eraser() function allows you to register a personal data eraser for comments. This function takes two arguments: a callback function and an array of data types to be erased. The callback function will be called when the user requests to erase their personal data. The array of data types specifies which data types should be erased. This function is useful for plugins that store personal data in comments. By registering a personal data eraser, you can ensure that your plugin complies with the GDPR and other privacy regulations.
wp_register_comment_personal_data_eraser( array $erasers ) #
Registers the personal data eraser for comments.
Parameters
- $erasers
(array)(Required)An array of personal data erasers.
Return
(array) An array of personal data erasers.
Source
File: wp-includes/comment.php
function wp_register_comment_personal_data_eraser( $erasers ) { $erasers['wordpress-comments'] = array( 'eraser_friendly_name' => __( 'WordPress Comments' ), 'callback' => 'wp_comments_personal_data_eraser', ); return $erasers; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.9.6 | Introduced. |