Changeset 49970
- Timestamp:
- 01/17/2021 05:45:01 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/privacy-tools.php
r49927 r49970 21 21 22 22 if ( ! $request || 'user_request' !== $request->post_type ) { 23 return new WP_Error( 'privacy_request_error', __( 'Invalid user privacyrequest.' ) );23 return new WP_Error( 'privacy_request_error', __( 'Invalid personal data request.' ) ); 24 24 } 25 25 … … 29 29 return $result; 30 30 } elseif ( ! $result ) { 31 return new WP_Error( 'privacy_request_error', __( 'Unable to initiate user privacy confirmationrequest.' ) );31 return new WP_Error( 'privacy_request_error', __( 'Unable to initiate confirmation for personal data request.' ) ); 32 32 } 33 33 … … 50 50 51 51 if ( ! $request ) { 52 return new WP_Error( 'privacy_request_error', __( 'Invalid user privacyrequest.' ) );52 return new WP_Error( 'privacy_request_error', __( 'Invalid personal data request.' ) ); 53 53 } 54 54 … … 105 105 'action_type', 106 106 'action_type', 107 __( 'Invalid user privacyaction.' ),107 __( 'Invalid personal data action.' ), 108 108 'error' 109 109 ); … … 117 117 'action_type', 118 118 'action_type', 119 __( 'Invalid user privacyaction.' ),119 __( 'Invalid personal data action.' ), 120 120 'error' 121 121 ); … … 298 298 function wp_privacy_generate_personal_data_export_file( $request_id ) { 299 299 if ( ! class_exists( 'ZipArchive' ) ) { 300 wp_send_json_error( __( 'Unable to generate user privacyexport file. ZipArchive not available.' ) );300 wp_send_json_error( __( 'Unable to generate personal data export file. ZipArchive not available.' ) ); 301 301 } 302 302 … … 305 305 306 306 if ( ! $request || 'export_personal_data' !== $request->action_name ) { 307 wp_send_json_error( __( 'Invalid request ID when generating user privacyexport file.' ) );307 wp_send_json_error( __( 'Invalid request ID when generating personal data export file.' ) ); 308 308 } 309 309 … … 311 311 312 312 if ( ! is_email( $email_address ) ) { 313 wp_send_json_error( __( 'Invalid email address when generating user privacyexport file.' ) );313 wp_send_json_error( __( 'Invalid email address when generating personal data export file.' ) ); 314 314 } 315 315 … … 319 319 320 320 if ( ! wp_mkdir_p( $exports_dir ) ) { 321 wp_send_json_error( __( 'Unable to create user privacyexport folder.' ) );321 wp_send_json_error( __( 'Unable to create personal data export folder.' ) ); 322 322 } 323 323 … … 327 327 $file = fopen( $index_pathname, 'w' ); 328 328 if ( false === $file ) { 329 wp_send_json_error( __( 'Unable to protect user privacyexport folder from browsing.' ) );329 wp_send_json_error( __( 'Unable to protect personal data export folder from browsing.' ) ); 330 330 } 331 331 fwrite( $file, '<!-- Silence is golden. -->' ); … … 396 396 397 397 if ( false === $file ) { 398 wp_send_json_error( __( 'Unable to open user privacyexport file (JSON report) for writing.' ) );398 wp_send_json_error( __( 'Unable to open personal data export file (JSON report) for writing.' ) ); 399 399 } 400 400 … … 411 411 412 412 if ( false === $file ) { 413 wp_send_json_error( __( 'Unable to open user privacy export file(HTML report) for writing.' ) );413 wp_send_json_error( __( 'Unable to open personal data export (HTML report) for writing.' ) ); 414 414 } 415 415 … … 505 505 if ( true === $zip->open( $archive_pathname, ZipArchive::CREATE ) ) { 506 506 if ( ! $zip->addFile( $json_report_pathname, 'export.json' ) ) { 507 $error = __( 'Unable to a dd data to user privacyexport file (JSON format).' );507 $error = __( 'Unable to archive the personal data export file (JSON format).' ); 508 508 } 509 509 510 510 if ( ! $zip->addFile( $html_report_pathname, 'index.html' ) ) { 511 $error = __( 'Unable to a dd data to user privacyexport file (HTML format).' );511 $error = __( 'Unable to archive the personal data export file (HTML format).' ); 512 512 } 513 513 … … 530 530 } 531 531 } else { 532 $error = __( 'Unable to open user privacyexport file (archive) for writing.' );532 $error = __( 'Unable to open personal data export file (archive) for writing.' ); 533 533 } 534 534 … … 759 759 760 760 if ( ! $request || 'export_personal_data' !== $request->action_name ) { 761 wp_send_json_error( __( 'Invalid request ID when merging user privacy exporter data.' ) );761 wp_send_json_error( __( 'Invalid request ID when merging personal data to export.' ) ); 762 762 } 763 763 … … 910 910 911 911 if ( ! $request || 'remove_personal_data' !== $request->action_name ) { 912 wp_send_json_error( __( 'Invalid request ID when processing user privacy eraser data.' ) );912 wp_send_json_error( __( 'Invalid request ID when processing personal data to erase.' ) ); 913 913 } 914 914 -
trunk/src/wp-includes/user.php
r49935 r49970 3124 3124 3125 3125 /** 3126 * Get all user privacyrequest types.3126 * Get all personal data request types. 3127 3127 * 3128 3128 * @since 4.9.6 … … 3806 3806 3807 3807 if ( $requests_query->found_posts ) { 3808 return new WP_Error( 'duplicate_request', __( 'An incomplete user privacyrequest for this email address already exists.' ) );3808 return new WP_Error( 'duplicate_request', __( 'An incomplete personal data request for this email address already exists.' ) ); 3809 3809 } 3810 3810 … … 3874 3874 3875 3875 if ( ! $request ) { 3876 return new WP_Error( 'invalid_request', __( 'Invalid user privacyrequest.' ) );3876 return new WP_Error( 'invalid_request', __( 'Invalid personal data request.' ) ); 3877 3877 } 3878 3878 … … 4062 4062 4063 4063 if ( ! $request || ! $saved_key || ! $key_request_time ) { 4064 return new WP_Error( 'invalid_request', __( 'Invalid user privacyrequest.' ) );4064 return new WP_Error( 'invalid_request', __( 'Invalid personal data request.' ) ); 4065 4065 } 4066 4066 4067 4067 if ( ! in_array( $request->status, array( 'request-pending', 'request-failed' ), true ) ) { 4068 return new WP_Error( 'expired_request', __( 'This user privacyrequest has expired.' ) );4068 return new WP_Error( 'expired_request', __( 'This personal data request has expired.' ) ); 4069 4069 } 4070 4070 4071 4071 if ( empty( $key ) ) { 4072 return new WP_Error( 'missing_key', __( 'Th is user privacy request is missing the confirmation key.' ) );4072 return new WP_Error( 'missing_key', __( 'The confirmation key is missing from this personal data request.' ) ); 4073 4073 } 4074 4074 … … 4089 4089 4090 4090 if ( ! $wp_hasher->CheckPassword( $key, $saved_key ) ) { 4091 return new WP_Error( 'invalid_key', __( 'Th is user privacy request confirmation key is invalid.' ) );4091 return new WP_Error( 'invalid_key', __( 'The confirmation key is invalid for this personal data request.' ) ); 4092 4092 } 4093 4093 4094 4094 if ( ! $expiration_time || time() > $expiration_time ) { 4095 return new WP_Error( 'expired_key', __( 'Th is user privacy request confirmation key has expired.' ) );4095 return new WP_Error( 'expired_key', __( 'The confirmation key has expired for this personal data request.' ) ); 4096 4096 } 4097 4097
Note: See TracChangeset
for help on using the changeset viewer.