diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index 9f404e3..32448c8 100644
a
|
b
|
function wp_privacy_generate_personal_data_export_file( $request_id ) { |
2013 | 2013 | $request = wp_get_user_request_data( $request_id ); |
2014 | 2014 | |
2015 | 2015 | if ( ! $request || 'export_personal_data' !== $request->action_name ) { |
2016 | | wp_send_json_error( __( 'Invalid request ID when generating export file' ) ); |
| 2016 | wp_send_json_error( __( 'Invalid request ID when generating export file.' ) ); |
2017 | 2017 | } |
2018 | 2018 | |
2019 | 2019 | $email_address = $request->email; |
2020 | 2020 | |
2021 | 2021 | if ( ! is_email( $email_address ) ) { |
2022 | | wp_send_json_error( __( 'Invalid email address when generating export file' ) ); |
| 2022 | wp_send_json_error( __( 'Invalid email address when generating export file.' ) ); |
2023 | 2023 | } |
2024 | 2024 | |
2025 | 2025 | // Create the exports folder if needed. |
… |
… |
function wp_privacy_generate_personal_data_export_file( $request_id ) { |
2037 | 2037 | if ( ! file_exists( $index_pathname ) ) { |
2038 | 2038 | $file = fopen( $index_pathname, 'w' ); |
2039 | 2039 | if ( false === $file ) { |
2040 | | wp_send_json_error( __( 'Unable to protect export folder from browsing' ) ); |
| 2040 | wp_send_json_error( __( 'Unable to protect export folder from browsing.' ) ); |
2041 | 2041 | } |
2042 | 2042 | fwrite( $file, 'Silence is golden.' ); |
2043 | 2043 | fclose( $file ); |
… |
… |
function wp_privacy_generate_personal_data_export_file( $request_id ) { |
2051 | 2051 | $html_report_pathname = $exports_dir . $html_report_filename; |
2052 | 2052 | $file = fopen( $html_report_pathname, 'w' ); |
2053 | 2053 | if ( false === $file ) { |
2054 | | wp_send_json_error( __( 'Unable to open export file (HTML report) for writing' ) ); |
| 2054 | wp_send_json_error( __( 'Unable to open export file (HTML report) for writing.' ) ); |
2055 | 2055 | } |
2056 | 2056 | |
2057 | 2057 | $title = sprintf( |
… |
… |
function wp_privacy_process_personal_data_export_page( $response, $exporter_inde |
2289 | 2289 | $request = wp_get_user_request_data( $request_id ); |
2290 | 2290 | |
2291 | 2291 | if ( ! $request || 'export_personal_data' !== $request->action_name ) { |
2292 | | wp_send_json_error( __( 'Invalid request ID when merging exporter data' ) ); |
| 2292 | wp_send_json_error( __( 'Invalid request ID when merging exporter data.' ) ); |
2293 | 2293 | } |
2294 | 2294 | |
2295 | 2295 | $export_data = array(); |
diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php
index 939ad16..0ae15bc 100644
a
|
b
|
class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Requests_Table { |
1352 | 1352 | $download_data_markup .= '<span class="export_personal_data_idle"><a href="#" >' . __( 'Download Personal Data' ) . '</a></span>' . |
1353 | 1353 | '<span style="display:none" class="export_personal_data_processing" >' . __( 'Downloading Data...' ) . '</span>' . |
1354 | 1354 | '<span style="display:none" class="export_personal_data_success"><a href="#" >' . __( 'Download Personal Data Again' ) . '</a></span>' . |
1355 | | '<span style="display:none" class="export_personal_data_failed">' . __( 'Download Failed!' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>'; |
| 1355 | '<span style="display:none" class="export_personal_data_failed">' . __( 'Download could not complete.' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>'; |
1356 | 1356 | |
1357 | 1357 | $download_data_markup .= '</div>'; |
1358 | 1358 | |
… |
… |
class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Requests_Table { |
1393 | 1393 | ?> |
1394 | 1394 | <span class="export_personal_data_idle"><a class="button" href="#" ><?php _e( 'Email Data' ); ?></a></span> |
1395 | 1395 | <span style="display:none" class="export_personal_data_processing button updating-message" ><?php _e( 'Sending Email...' ); ?></span> |
1396 | | <span style="display:none" class="export_personal_data_success success-message" ><?php _e( 'Email Sent!' ); ?></span> |
1397 | | <span style="display:none" class="export_personal_data_failed"><?php _e( 'Email Failed!' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span> |
| 1396 | <span style="display:none" class="export_personal_data_success success-message" ><?php _e( 'Email Sent.' ); ?></span> |
| 1397 | <span style="display:none" class="export_personal_data_failed"><?php _e( 'Email could not be send.' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span> |
1398 | 1398 | <?php |
1399 | 1399 | |
1400 | 1400 | echo '</div>'; |
… |
… |
class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table { |
1463 | 1463 | |
1464 | 1464 | $remove_data_markup .= '<span class="remove_personal_data_idle"><a href="#" >' . __( 'Force Remove Personal Data' ) . '</a></span>' . |
1465 | 1465 | '<span style="display:none" class="remove_personal_data_processing" >' . __( 'Removing Data...' ) . '</span>' . |
1466 | | '<span style="display:none" class="remove_personal_data_failed">' . __( 'Force Remove Failed!' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>'; |
| 1466 | '<span style="display:none" class="remove_personal_data_failed">' . __( 'Force Remove could not complete.' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>'; |
1467 | 1467 | |
1468 | 1468 | $remove_data_markup .= '</div>'; |
1469 | 1469 | |
… |
… |
class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table { |
1505 | 1505 | ?> |
1506 | 1506 | <span class="remove_personal_data_idle"><a class="button" href="#" ><?php _e( 'Remove Personal Data' ); ?></a></span> |
1507 | 1507 | <span style="display:none" class="remove_personal_data_processing button updating-message" ><?php _e( 'Removing Data...' ); ?></span> |
1508 | | <span style="display:none" class="remove_personal_data_failed"><?php _e( 'Removing Data Failed!' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span> |
| 1508 | <span style="display:none" class="remove_personal_data_failed"><?php _e( 'Removing Data could not complete.' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span> |
1509 | 1509 | <?php |
1510 | 1510 | |
1511 | 1511 | echo '</div>'; |
diff --git a/src/wp-admin/privacy.php b/src/wp-admin/privacy.php
index e16db91..1d17f0f 100644
a
|
b
|
require_once( ABSPATH . 'wp-admin/admin-header.php' ); |
201 | 201 | <form method="post" action=""> |
202 | 202 | <input type="hidden" name="action" value="create-privacy-page" /> |
203 | 203 | <span> |
204 | | <?php _e( 'Or create a new page: ' ); ?> |
| 204 | <?php _e( 'Or create a new page:' ); ?> |
205 | 205 | </span> |
206 | 206 | <?php |
207 | 207 | wp_nonce_field( 'create-privacy-page' ); |
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 621544e..1d86629 100644
a
|
b
|
function wp_create_user_request( $email_address = '', $action_name = '', $reques |
2987 | 2987 | $action_name = sanitize_key( $action_name ); |
2988 | 2988 | |
2989 | 2989 | if ( ! is_email( $email_address ) ) { |
2990 | | return new WP_Error( 'invalid_email', __( 'Invalid email address' ) ); |
| 2990 | return new WP_Error( 'invalid_email', __( 'Invalid email address.' ) ); |
2991 | 2991 | } |
2992 | 2992 | |
2993 | 2993 | if ( ! $action_name ) { |
2994 | | return new WP_Error( 'invalid_action', __( 'Invalid action name' ) ); |
| 2994 | return new WP_Error( 'invalid_action', __( 'Invalid action name.' ) ); |
2995 | 2995 | } |
2996 | 2996 | |
2997 | 2997 | $user = get_user_by( 'email', $email_address ); |
diff --git a/src/wp-login.php b/src/wp-login.php
index 4bdd831..9a73c4e 100644
a
|
b
|
switch ( $action ) { |
860 | 860 | |
861 | 861 | case 'confirmaction' : |
862 | 862 | if ( ! isset( $_GET['request_id'] ) ) { |
863 | | wp_die( __( 'Invalid request' ) ); |
| 863 | wp_die( __( 'Invalid request.' ) ); |
864 | 864 | } |
865 | 865 | |
866 | 866 | $request_id = (int) $_GET['request_id']; |