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
|
@ -235,6 +235,11 @@ function _wp_personal_data_cleanup_requests() {
|
|||
*/
|
||||
function wp_privacy_generate_personal_data_export_group_html( $group_data ) {
|
||||
$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>';
|
||||
|
||||
foreach ( (array) $group_data['items'] as $group_item_id => $group_item_data ) {
|
||||
|
@ -356,6 +361,8 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
|
|||
$about_group = array(
|
||||
/* translators: Header for the About section in a personal data export. */
|
||||
'group_label' => _x( 'About', 'personal data group label' ),
|
||||
/* 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(
|
||||
array(
|
||||
|
@ -613,9 +620,16 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde
|
|||
foreach ( (array) $export_data as $export_datum ) {
|
||||
$group_id = $export_datum['group_id'];
|
||||
$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 ) ) {
|
||||
$groups[ $group_id ] = array(
|
||||
'group_label' => $group_label,
|
||||
'group_description' => $group_description,
|
||||
'items' => array(),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3436,6 +3436,7 @@ function wp_comments_personal_data_exporter( $email_address, $page = 1 ) {
|
|||
$data_to_export[] = array(
|
||||
'group_id' => 'comments',
|
||||
'group_label' => __( 'Comments' ),
|
||||
'group_description' => __( 'User’s comment data.' ),
|
||||
'item_id' => "comment-{$comment->comment_ID}",
|
||||
'data' => $comment_data_to_export,
|
||||
);
|
||||
|
|
|
@ -4309,6 +4309,7 @@ function wp_media_personal_data_exporter( $email_address, $page = 1 ) {
|
|||
$data_to_export[] = array(
|
||||
'group_id' => 'media',
|
||||
'group_label' => __( 'Media' ),
|
||||
'group_description' => __( 'User’s media data.' ),
|
||||
'item_id' => "post-{$post->ID}",
|
||||
'data' => $post_data_to_export,
|
||||
);
|
||||
|
|
|
@ -2996,6 +2996,7 @@ function wp_user_personal_data_exporter( $email_address ) {
|
|||
$data_to_export[] = array(
|
||||
'group_id' => 'user',
|
||||
'group_label' => __( 'User' ),
|
||||
'group_description' => __( 'User’s profile data.' ),
|
||||
'item_id' => "user-{$user->ID}",
|
||||
'data' => $user_data_to_export,
|
||||
);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @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.
|
||||
|
|
Loading…
Reference in New Issue