Privacy: Rename `username_or_email_to_export` POST variable on Erase Personal Data screen to a more generic `username_or_email_for_privacy_request`.

Props ianbelanger, allendav.
Fixes #44181.
Built from https://develop.svn.wordpress.org/trunk@43478


git-svn-id: http://core.svn.wordpress.org/trunk@43305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-07-17 14:15:25 +00:00
parent b1330814e2
commit 8f49d94630
2 changed files with 15 additions and 15 deletions

View File

@ -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() {
<p><?php esc_html_e( 'An email will be sent to the user at this email address asking them to verify the request.' ); ?></p>
<div class="wp-privacy-request-form-field">
<label for="username_or_email_to_export"><?php esc_html_e( 'Username or email address' ); ?></label>
<input type="text" required class="regular-text" id="username_or_email_to_export" name="username_or_email_to_export" />
<label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label>
<input type="text" required class="regular-text" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" />
<?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?>
</div>
<?php wp_nonce_field( 'personal-data-request' ); ?>
@ -887,8 +887,8 @@ function _wp_personal_data_removal_page() {
<p><?php esc_html_e( 'An email will be sent to the user at this email address asking them to verify the request.' ); ?></p>
<div class="wp-privacy-request-form-field">
<label for="username_or_email_to_export"><?php esc_html_e( 'Username or email address' ); ?></label>
<input type="text" required class="regular-text" id="username_or_email_to_export" name="username_or_email_to_export" />
<label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label>
<input type="text" required class="regular-text" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" />
<?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?>
</div>
<?php wp_nonce_field( 'personal-data-request' ); ?>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43477';
$wp_version = '5.0-alpha-43478';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.