Make WordPress Core

Changeset 43232


Ignore:
Timestamp:
05/10/2018 08:52:54 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Update request confirmation notice text for clarity.

Props desrosj, melchoyce, garrett-eclipse.
Fixes #43970.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/login.css

    r43120 r43232  
    5050
    5151.login .message,
     52.login .success,
    5253.login #login_error {
    5354    border-left: 4px solid #00a0d2;
     
    5758    background-color: #fff;
    5859    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
     60}
     61
     62.login .success {
     63    border-left-color: #46b450;
    5964}
    6065
  • trunk/src/wp-includes/default-filters.php

    r43223 r43232  
    351351add_action( 'user_request_action_confirmed', '_wp_privacy_account_request_confirmed' );
    352352add_action( 'user_request_action_confirmed', '_wp_privacy_send_request_confirmation_notification', 12 ); // After request marked as completed.
    353 add_filter( 'user_request_action_confirmed_message', '_wp_privacy_account_request_confirmed_message', 10, 2 );
    354353add_filter( 'wp_privacy_personal_data_exporters', 'wp_register_comment_personal_data_exporter' );
    355354add_filter( 'wp_privacy_personal_data_exporters', 'wp_register_media_personal_data_exporter' );
  • trunk/src/wp-includes/user.php

    r43230 r43232  
    31873187 * @access private
    31883188 *
     3189 * @param int $request_id The request ID being confirmed.
    31893190 * @return string $message The confirmation message.
    31903191 */
    3191 function _wp_privacy_account_request_confirmed_message( $message, $request_id ) {
     3192function _wp_privacy_account_request_confirmed_message( $request_id ) {
    31923193    $request = wp_get_user_request_data( $request_id );
    31933194
     3195    $message = '<p class="success">' . __( 'Action has been confirmed.' ) . '</p>';
     3196    $message .= '<p>' . __( 'The site administrator has been notified and will fulfill your request as soon as possible.' ) . '</p>';
     3197
    31943198    if ( $request && in_array( $request->action_name, _wp_privacy_action_request_types(), true ) ) {
    3195         $message  = '<p class="message">' . __( 'Action has been confirmed.' ) . '</p>';
    3196         $message .= __( 'The site administrator has been notified and will fulfill your request as soon as possible.' );
    3197     }
     3199        if ( 'export_personal_data' === $request->action_name ) {
     3200            $message = '<p class="success">' . __( 'Thanks for confirming your export request.' ) . '</p>';
     3201            $message .= '<p>' . __( 'The site administrator has been notified. You will receive a link to download your export via email when they fulfill your request.' ) . '</p>';
     3202        } elseif ( 'remove_personal_data' === $request->action_name ) {
     3203            $message = '<p class="success">' . __( 'Thanks for confirming your erasure request.' ) . '</p>';
     3204            $message .= '<p>' . __( 'The site administrator has been notified. You will receive an email confirmation when they erase your data.' ) . '</p>';
     3205        }
     3206    }
     3207
     3208    /**
     3209     * Filters the message displayed to a user when they confirm a data request.
     3210     *
     3211     * @since 4.9.6
     3212     *
     3213     * @param string $message    The message to the user.
     3214     * @param int    $request_id The ID of the request being confirmed.
     3215     */
     3216    $message = apply_filters( 'user_request_action_confirmed_message', $message, $request_id );
    31983217
    31993218    return $message;
  • trunk/src/wp-login.php

    r43120 r43232  
    891891        do_action( 'user_request_action_confirmed', $request_id );
    892892
    893         $message = apply_filters( 'user_request_action_confirmed_message', '<p class="message">' . __( 'Action has been confirmed.' ) . '</p>', $request_id );
     893        $message = _wp_privacy_account_request_confirmed_message( $request_id );
    894894
    895895        login_header( __( 'User action confirmed.' ), $message );
Note: See TracChangeset for help on using the changeset viewer.