diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 49f9bc2ddd..9a2dc5dadf 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -671,7 +671,7 @@ function _wp_personal_data_handle_actions() { case 'add_remove_personal_data_request': check_admin_referer( 'personal-data-request' ); - if ( ! isset( $_POST['type_of_action'], $_POST['username_or_email_to_export'] ) ) { + if ( ! isset( $_POST['type_of_action'], $_POST['username_or_email_for_privacy_request'] ) ) { add_settings_error( 'action_type', 'action_type', @@ -680,7 +680,7 @@ function _wp_personal_data_handle_actions() { ); } $action_type = sanitize_text_field( wp_unslash( $_POST['type_of_action'] ) ); - $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_to_export'] ) ); + $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_for_privacy_request'] ) ); $email_address = ''; if ( ! in_array( $action_type, _wp_privacy_action_request_types(), true ) ) { @@ -696,8 +696,8 @@ function _wp_personal_data_handle_actions() { $user = get_user_by( 'login', $username_or_email_address ); if ( ! $user instanceof WP_User ) { add_settings_error( - 'username_or_email_to_export', - 'username_or_email_to_export', + 'username_or_email_for_privacy_request', + 'username_or_email_for_privacy_request', __( 'Unable to add this request. A valid email address or username must be supplied.' ), 'error' ); @@ -716,16 +716,16 @@ function _wp_personal_data_handle_actions() { if ( is_wp_error( $request_id ) ) { add_settings_error( - 'username_or_email_to_export', - 'username_or_email_to_export', + 'username_or_email_for_privacy_request', + 'username_or_email_for_privacy_request', $request_id->get_error_message(), 'error' ); break; } elseif ( ! $request_id ) { add_settings_error( - 'username_or_email_to_export', - 'username_or_email_to_export', + 'username_or_email_for_privacy_request', + 'username_or_email_for_privacy_request', __( 'Unable to initiate confirmation request.' ), 'error' ); @@ -735,8 +735,8 @@ function _wp_personal_data_handle_actions() { wp_send_user_request( $request_id ); add_settings_error( - 'username_or_email_to_export', - 'username_or_email_to_export', + 'username_or_email_for_privacy_request', + 'username_or_email_for_privacy_request', __( 'Confirmation request initiated successfully.' ), 'updated' ); @@ -814,8 +814,8 @@ function _wp_personal_data_export_page() {