Privacy: Improve docblocks for hooks and functions related to personal data export and erasure.

See #58833

Built from https://develop.svn.wordpress.org/trunk@56482


git-svn-id: http://core.svn.wordpress.org/trunk@55994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2023-08-28 21:53:21 +00:00
parent 2213e52fd8
commit 46fda1912c
5 changed files with 47 additions and 18 deletions

View File

@ -4939,8 +4939,8 @@ function wp_ajax_wp_privacy_export_personal_data() {
* Array of personal data exporters.
*
* @type callable $callback Callable exporter function that accepts an
* email address and a page and returns an array
* of name => value pairs of personal data.
* email address and a page number and returns an
* array of name => value pairs of personal data.
* @type string $exporter_friendly_name Translated user facing friendly name for the
* exporter.
* }
@ -5051,10 +5051,10 @@ function wp_ajax_wp_privacy_export_personal_data() {
*
* @since 4.9.6
*
* @param array $response The personal data for the given exporter and page.
* @param array $response The personal data for the given exporter and page number.
* @param int $exporter_index The index of the exporter that provided this data.
* @param string $email_address The email address associated with this personal data.
* @param int $page The page for this response.
* @param int $page The page number for this response.
* @param int $request_id The privacy request post ID associated with this request.
* @param bool $send_as_email Whether the final results of the export should be emailed to the user.
* @param string $exporter_key The key (slug) of the exporter that provided this data.
@ -5128,8 +5128,8 @@ function wp_ajax_wp_privacy_erase_personal_data() {
* @type array ...$0 {
* Array of personal data exporters.
*
* @type callable $callback Callable eraser that accepts an email address and
* a page and returns an array with boolean values for
* @type callable $callback Callable eraser that accepts an email address and a page
* number, and returns an array with boolean values for
* whether items were removed or retained and any messages
* from the eraser, as well as if additional pages are
* available.
@ -5281,10 +5281,17 @@ function wp_ajax_wp_privacy_erase_personal_data() {
*
* @since 4.9.6
*
* @param array $response The personal data for the given exporter and page.
* @param array $response {
* The personal data for the given exporter and page number.
*
* @type bool $items_removed Whether items were actually removed or not.
* @type bool $items_retained Whether items were retained or not.
* @type string[] $messages An array of messages to add to the personal data export file.
* @type bool $done Whether the eraser is finished or not.
* }
* @param int $eraser_index The index of the eraser that provided this data.
* @param string $email_address The email address associated with this personal data.
* @param int $page The page for this response.
* @param int $page The page number for this response.
* @param int $request_id The privacy request post ID associated with this request.
* @param string $eraser_key The key (slug) of the eraser that provided this data.
*/

View File

@ -3684,8 +3684,8 @@ function wp_handle_comment_submission( $comment_data ) {
*
* @since 4.9.6
*
* @param array $exporters An array of personal data exporters.
* @return array An array of personal data exporters.
* @param array[] $exporters An array of personal data exporters.
* @return array[] An array of personal data exporters.
*/
function wp_register_comment_personal_data_exporter( $exporters ) {
$exporters['wordpress-comments'] = array(
@ -3702,8 +3702,13 @@ function wp_register_comment_personal_data_exporter( $exporters ) {
* @since 4.9.6
*
* @param string $email_address The comment author email address.
* @param int $page Comment page.
* @return array An array of personal data.
* @param int $page Comment page number.
* @return array {
* An array of personal data.
*
* @type array[] $data An array of personal data arrays.
* @type bool $done Whether the exporter is finished.
* }
*/
function wp_comments_personal_data_exporter( $email_address, $page = 1 ) {
// Limit us to 500 comments at a time to avoid timing out.
@ -3814,8 +3819,15 @@ function wp_register_comment_personal_data_eraser( $erasers ) {
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $email_address The comment author email address.
* @param int $page Comment page.
* @return array
* @param int $page Comment page number.
* @return array {
* Data removal results.
*
* @type bool $items_removed Whether items were actually removed.
* @type bool $items_retained Whether items were retained.
* @type string[] $messages An array of messages to add to the personal data export file.
* @type bool $done Whether the eraser is finished.
* }
*/
function wp_comments_personal_data_eraser( $email_address, $page = 1 ) {
global $wpdb;

View File

@ -5359,8 +5359,13 @@ function wp_register_media_personal_data_exporter( $exporters ) {
* @since 4.9.6
*
* @param string $email_address The attachment owner email address.
* @param int $page Attachment page.
* @return array An array of personal data.
* @param int $page Attachment page number.
* @return array {
* An array of personal data.
*
* @type array[] $data An array of personal data arrays.
* @type bool $done Whether the exporter is finished.
* }
*/
function wp_media_personal_data_exporter( $email_address, $page = 1 ) {
// Limit us to 50 attachments at a time to avoid timing out.

View File

@ -3807,7 +3807,12 @@ function wp_register_user_personal_data_exporter( $exporters ) {
* @since 5.4.0 Added 'Session Tokens' group to the export data.
*
* @param string $email_address The user's email address.
* @return array An array of personal data.
* @return array {
* An array of personal data.
*
* @type array[] $data An array of personal data arrays.
* @type bool $done Whether the exporter is finished.
* }
*/
function wp_user_personal_data_exporter( $email_address ) {
$email_address = trim( $email_address );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56481';
$wp_version = '6.4-alpha-56482';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.