Make WordPress Core


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.