Privacy: Add descriptions for sections in a personal data export file.
Props garrett-eclipse, Venutius, karmatosed. Fixes #45491. Built from https://develop.svn.wordpress.org/trunk@45825 git-svn-id: http://core.svn.wordpress.org/trunk@45636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
53f5b172ab
commit
d9954ed4cb
|
@ -234,7 +234,12 @@ function _wp_personal_data_cleanup_requests() {
|
||||||
* @return string The HTML for this group and its items.
|
* @return string The HTML for this group and its items.
|
||||||
*/
|
*/
|
||||||
function wp_privacy_generate_personal_data_export_group_html( $group_data ) {
|
function wp_privacy_generate_personal_data_export_group_html( $group_data ) {
|
||||||
$group_html = '<h2>' . esc_html( $group_data['group_label'] ) . '</h2>';
|
$group_html = '<h2>' . esc_html( $group_data['group_label'] ) . '</h2>';
|
||||||
|
|
||||||
|
if ( ! empty( $group_data['group_description'] ) ) {
|
||||||
|
$group_html .= '<p>' . esc_html( $group_data['group_description'] ) . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
$group_html .= '<div>';
|
$group_html .= '<div>';
|
||||||
|
|
||||||
foreach ( (array) $group_data['items'] as $group_item_id => $group_item_data ) {
|
foreach ( (array) $group_data['items'] as $group_item_id => $group_item_data ) {
|
||||||
|
@ -355,8 +360,10 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
|
||||||
// First, build an "About" group on the fly for this report.
|
// First, build an "About" group on the fly for this report.
|
||||||
$about_group = array(
|
$about_group = array(
|
||||||
/* translators: Header for the About section in a personal data export. */
|
/* translators: Header for the About section in a personal data export. */
|
||||||
'group_label' => _x( 'About', 'personal data group label' ),
|
'group_label' => _x( 'About', 'personal data group label' ),
|
||||||
'items' => array(
|
/* translators: Description for the About section in a personal data export. */
|
||||||
|
'group_description' => _x( 'Overview of export report.', 'personal data group description' ),
|
||||||
|
'items' => array(
|
||||||
'about-1' => array(
|
'about-1' => array(
|
||||||
array(
|
array(
|
||||||
'name' => _x( 'Report generated for', 'email address' ),
|
'name' => _x( 'Report generated for', 'email address' ),
|
||||||
|
@ -613,10 +620,17 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde
|
||||||
foreach ( (array) $export_data as $export_datum ) {
|
foreach ( (array) $export_data as $export_datum ) {
|
||||||
$group_id = $export_datum['group_id'];
|
$group_id = $export_datum['group_id'];
|
||||||
$group_label = $export_datum['group_label'];
|
$group_label = $export_datum['group_label'];
|
||||||
|
|
||||||
|
$group_description = '';
|
||||||
|
if ( ! empty( $export_datum['group_description'] ) ) {
|
||||||
|
$group_description = $export_datum['group_description'];
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! array_key_exists( $group_id, $groups ) ) {
|
if ( ! array_key_exists( $group_id, $groups ) ) {
|
||||||
$groups[ $group_id ] = array(
|
$groups[ $group_id ] = array(
|
||||||
'group_label' => $group_label,
|
'group_label' => $group_label,
|
||||||
'items' => array(),
|
'group_description' => $group_description,
|
||||||
|
'items' => array(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3434,10 +3434,11 @@ function wp_comments_personal_data_exporter( $email_address, $page = 1 ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$data_to_export[] = array(
|
$data_to_export[] = array(
|
||||||
'group_id' => 'comments',
|
'group_id' => 'comments',
|
||||||
'group_label' => __( 'Comments' ),
|
'group_label' => __( 'Comments' ),
|
||||||
'item_id' => "comment-{$comment->comment_ID}",
|
'group_description' => __( 'User’s comment data.' ),
|
||||||
'data' => $comment_data_to_export,
|
'item_id' => "comment-{$comment->comment_ID}",
|
||||||
|
'data' => $comment_data_to_export,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4307,10 +4307,11 @@ function wp_media_personal_data_exporter( $email_address, $page = 1 ) {
|
||||||
);
|
);
|
||||||
|
|
||||||
$data_to_export[] = array(
|
$data_to_export[] = array(
|
||||||
'group_id' => 'media',
|
'group_id' => 'media',
|
||||||
'group_label' => __( 'Media' ),
|
'group_label' => __( 'Media' ),
|
||||||
'item_id' => "post-{$post->ID}",
|
'group_description' => __( 'User’s media data.' ),
|
||||||
'data' => $post_data_to_export,
|
'item_id' => "post-{$post->ID}",
|
||||||
|
'data' => $post_data_to_export,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2994,10 +2994,11 @@ function wp_user_personal_data_exporter( $email_address ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$data_to_export[] = array(
|
$data_to_export[] = array(
|
||||||
'group_id' => 'user',
|
'group_id' => 'user',
|
||||||
'group_label' => __( 'User' ),
|
'group_label' => __( 'User' ),
|
||||||
'item_id' => "user-{$user->ID}",
|
'group_description' => __( 'User’s profile data.' ),
|
||||||
'data' => $user_data_to_export,
|
'item_id' => "user-{$user->ID}",
|
||||||
|
'data' => $user_data_to_export,
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45824';
|
$wp_version = '5.3-alpha-45825';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue