Make WordPress Core


Ignore:
Timestamp:
07/17/2018 02:14:47 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/user.php

    r43465 r43478  
    672672                check_admin_referer( 'personal-data-request' );
    673673
    674                 if ( ! isset( $_POST['type_of_action'], $_POST['username_or_email_to_export'] ) ) {
     674                if ( ! isset( $_POST['type_of_action'], $_POST['username_or_email_for_privacy_request'] ) ) {
    675675                    add_settings_error(
    676676                        'action_type',
     
    681681                }
    682682                $action_type               = sanitize_text_field( wp_unslash( $_POST['type_of_action'] ) );
    683                 $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_to_export'] ) );
     683                $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_for_privacy_request'] ) );
    684684                $email_address             = '';
    685685
     
    697697                    if ( ! $user instanceof WP_User ) {
    698698                        add_settings_error(
    699                             'username_or_email_to_export',
    700                             'username_or_email_to_export',
     699                            'username_or_email_for_privacy_request',
     700                            'username_or_email_for_privacy_request',
    701701                            __( 'Unable to add this request. A valid email address or username must be supplied.' ),
    702702                            'error'
     
    717717                if ( is_wp_error( $request_id ) ) {
    718718                    add_settings_error(
    719                         'username_or_email_to_export',
    720                         'username_or_email_to_export',
     719                        'username_or_email_for_privacy_request',
     720                        'username_or_email_for_privacy_request',
    721721                        $request_id->get_error_message(),
    722722                        'error'
     
    725725                } elseif ( ! $request_id ) {
    726726                    add_settings_error(
    727                         'username_or_email_to_export',
    728                         'username_or_email_to_export',
     727                        'username_or_email_for_privacy_request',
     728                        'username_or_email_for_privacy_request',
    729729                        __( 'Unable to initiate confirmation request.' ),
    730730                        'error'
     
    736736
    737737                add_settings_error(
    738                     'username_or_email_to_export',
    739                     'username_or_email_to_export',
     738                    'username_or_email_for_privacy_request',
     739                    'username_or_email_for_privacy_request',
    740740                    __( 'Confirmation request initiated successfully.' ),
    741741                    'updated'
     
    815815
    816816            <div class="wp-privacy-request-form-field">
    817                 <label for="username_or_email_to_export"><?php esc_html_e( 'Username or email address' ); ?></label>
    818                 <input type="text" required class="regular-text" id="username_or_email_to_export" name="username_or_email_to_export" />
     817                <label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label>
     818                <input type="text" required class="regular-text" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" />
    819819                <?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?>
    820820            </div>
     
    888888
    889889            <div class="wp-privacy-request-form-field">
    890                 <label for="username_or_email_to_export"><?php esc_html_e( 'Username or email address' ); ?></label>
    891                 <input type="text" required class="regular-text" id="username_or_email_to_export" name="username_or_email_to_export" />
     890                <label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label>
     891                <input type="text" required class="regular-text" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" />
    892892                <?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?>
    893893            </div>
Note: See TracChangeset for help on using the changeset viewer.