Make WordPress Core

Changeset 43479 for branches/4.9


Ignore:
Timestamp:
07/17/2018 02:17:42 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.
Merges [43478] to the 4.9 branch.
Fixes #44181.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/user.php

    r43305 r43479  
    631631                check_admin_referer( 'personal-data-request' );
    632632
    633                 if ( ! isset( $_POST['type_of_action'], $_POST['username_or_email_to_export'] ) ) { // WPCS: input var ok.
     633                if ( ! isset( $_POST['type_of_action'], $_POST['username_or_email_for_privacy_request'] ) ) {
    634634                    add_settings_error(
    635635                        'action_type',
     
    639639                    );
    640640                }
    641                 $action_type               = sanitize_text_field( wp_unslash( $_POST['type_of_action'] ) ); // WPCS: input var ok.
    642                 $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_to_export'] ) ); // WPCS: input var ok.
     641                $action_type               = sanitize_text_field( wp_unslash( $_POST['type_of_action'] ) );
     642                $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_for_privacy_request'] ) );
    643643                $email_address             = '';
    644644
     
    656656                    if ( ! $user instanceof WP_User ) {
    657657                        add_settings_error(
    658                             'username_or_email_to_export',
    659                             'username_or_email_to_export',
     658                            'username_or_email_for_privacy_request',
     659                            'username_or_email_for_privacy_request',
    660660                            __( 'Unable to add this request. A valid email address or username must be supplied.' ),
    661661                            'error'
     
    676676                if ( is_wp_error( $request_id ) ) {
    677677                    add_settings_error(
    678                         'username_or_email_to_export',
    679                         'username_or_email_to_export',
     678                        'username_or_email_for_privacy_request',
     679                        'username_or_email_for_privacy_request',
    680680                        $request_id->get_error_message(),
    681681                        'error'
     
    684684                } elseif ( ! $request_id ) {
    685685                    add_settings_error(
    686                         'username_or_email_to_export',
    687                         'username_or_email_to_export',
     686                        'username_or_email_for_privacy_request',
     687                        'username_or_email_for_privacy_request',
    688688                        __( 'Unable to initiate confirmation request.' ),
    689689                        'error'
     
    695695
    696696                add_settings_error(
    697                     'username_or_email_to_export',
    698                     'username_or_email_to_export',
     697                    'username_or_email_for_privacy_request',
     698                    'username_or_email_for_privacy_request',
    699699                    __( 'Confirmation request initiated successfully.' ),
    700700                    'updated'
     
    774774
    775775            <div class="wp-privacy-request-form-field">
    776                 <label for="username_or_email_to_export"><?php esc_html_e( 'Username or email address' ); ?></label>
    777                 <input type="text" required class="regular-text" id="username_or_email_to_export" name="username_or_email_to_export" />
     776                <label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label>
     777                <input type="text" required class="regular-text" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" />
    778778                <?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?>
    779779            </div>
     
    847847
    848848            <div class="wp-privacy-request-form-field">
    849                 <label for="username_or_email_to_export"><?php esc_html_e( 'Username or email address' ); ?></label>
    850                 <input type="text" required class="regular-text" id="username_or_email_to_export" name="username_or_email_to_export" />
     849                <label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label>
     850                <input type="text" required class="regular-text" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" />
    851851                <?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?>
    852852            </div>
Note: See TracChangeset for help on using the changeset viewer.