diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css index 8094f76c5f..32b5560c23 100644 --- a/src/wp-admin/css/login.css +++ b/src/wp-admin/css/login.css @@ -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; } diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 61c45e6231..5487c8fbe4 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -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 ); diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index a5254bf4d3..380c0dff45 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -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 = '
' . __( 'Action has been confirmed.' ) . '
'; + $message .= '' . __( 'The site administrator has been notified and will fulfill your request as soon as possible.' ) . '
'; + if ( $request && in_array( $request->action_name, _wp_privacy_action_request_types(), true ) ) { - $message = ' '; - $message .= __( 'The site administrator has been notified and will fulfill your request as soon as possible.' ); + if ( 'export_personal_data' === $request->action_name ) { + $message = '' . __( 'Thanks for confirming your export request.' ) . '
'; + $message .= '' . __( 'The site administrator has been notified. You will receive a link to download your export via email when they fulfill your request.' ) . '
'; + } elseif ( 'remove_personal_data' === $request->action_name ) { + $message = '' . __( 'Thanks for confirming your erasure request.' ) . '
'; + $message .= '' . __( 'The site administrator has been notified. You will receive an email confirmation when they erase your data.' ) . '
'; + } } + /** + * 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; } diff --git a/src/wp-login.php b/src/wp-login.php index cdbf52a43c..e02208ae56 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -890,7 +890,7 @@ switch ( $action ) { */ do_action( 'user_request_action_confirmed', $request_id ); - $message = apply_filters( 'user_request_action_confirmed_message', ' ', $request_id ); + $message = _wp_privacy_account_request_confirmed_message( $request_id ); login_header( __( 'User action confirmed.' ), $message ); login_footer();