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.


Top ↑

Return

(array) An array of personal data erasers.


Top ↑

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;
}


Top ↑

Changelog

Changelog
VersionDescription
4.9.6Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More