Privacy: Update request confirmation notice text for clarity.

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

git-svn-id: https://develop.svn.wordpress.org/trunk@43232 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-05-10 20:52:54 +00:00
parent bc5ecec3fc
commit 0a56b67b52
4 changed files with 28 additions and 5 deletions

View File

@ -49,6 +49,7 @@ p {
}
.login .message,
.login .success,
.login #login_error {
border-left: 4px solid #00a0d2;
padding: 12px;
@ -58,6 +59,10 @@ p {
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
}
.login .success {
border-left-color: #46b450;
}
.login #login_error {
border-left-color: #dc3232;
}

View File

@ -350,7 +350,6 @@ add_action( 'welcome_panel', 'wp_welcome_panel' );
// Privacy
add_action( 'user_request_action_confirmed', '_wp_privacy_account_request_confirmed' );
add_action( 'user_request_action_confirmed', '_wp_privacy_send_request_confirmation_notification', 12 ); // After request marked as completed.
add_filter( 'user_request_action_confirmed_message', '_wp_privacy_account_request_confirmed_message', 10, 2 );
add_filter( 'wp_privacy_personal_data_exporters', 'wp_register_comment_personal_data_exporter' );
add_filter( 'wp_privacy_personal_data_exporters', 'wp_register_media_personal_data_exporter' );
add_filter( 'wp_privacy_personal_data_exporters', 'wp_register_user_personal_data_exporter', 1 );

View File

@ -3186,16 +3186,35 @@ All at ###SITENAME###
* @since 4.9.6
* @access private
*
* @param int $request_id The request ID being confirmed.
* @return string $message The confirmation message.
*/
function _wp_privacy_account_request_confirmed_message( $message, $request_id ) {
function _wp_privacy_account_request_confirmed_message( $request_id ) {
$request = wp_get_user_request_data( $request_id );
$message = '<p class="success">' . __( 'Action has been confirmed.' ) . '</p>';
$message .= '<p>' . __( 'The site administrator has been notified and will fulfill your request as soon as possible.' ) . '</p>';
if ( $request && in_array( $request->action_name, _wp_privacy_action_request_types(), true ) ) {
$message = '<p class="message">' . __( 'Action has been confirmed.' ) . '</p>';
$message .= __( 'The site administrator has been notified and will fulfill your request as soon as possible.' );
if ( 'export_personal_data' === $request->action_name ) {
$message = '<p class="success">' . __( 'Thanks for confirming your export request.' ) . '</p>';
$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>';
} elseif ( 'remove_personal_data' === $request->action_name ) {
$message = '<p class="success">' . __( 'Thanks for confirming your erasure request.' ) . '</p>';
$message .= '<p>' . __( 'The site administrator has been notified. You will receive an email confirmation when they erase your data.' ) . '</p>';
}
}
/**
* Filters the message displayed to a user when they confirm a data request.
*
* @since 4.9.6
*
* @param string $message The message to the user.
* @param int $request_id The ID of the request being confirmed.
*/
$message = apply_filters( 'user_request_action_confirmed_message', $message, $request_id );
return $message;
}

View File

@ -890,7 +890,7 @@ switch ( $action ) {
*/
do_action( 'user_request_action_confirmed', $request_id );
$message = apply_filters( 'user_request_action_confirmed_message', '<p class="message">' . __( 'Action has been confirmed.' ) . '</p>', $request_id );
$message = _wp_privacy_account_request_confirmed_message( $request_id );
login_header( __( 'User action confirmed.' ), $message );
login_footer();