Privacy: Update request confirmation notice text for clarity.

Props desrosj, melchoyce, garrett-eclipse.
Fixes #43970.
Built from https://develop.svn.wordpress.org/trunk@43232


git-svn-id: http://core.svn.wordpress.org/trunk@43061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-05-10 20:53:21 +00:00
parent bed52dda40
commit ae2b929294
8 changed files with 36 additions and 8 deletions

View File

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

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

@ -350,7 +350,6 @@ add_action( 'welcome_panel', 'wp_welcome_panel' );
// Privacy // Privacy
add_action( 'user_request_action_confirmed', '_wp_privacy_account_request_confirmed' ); 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_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_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_media_personal_data_exporter' );
add_filter( 'wp_privacy_personal_data_exporters', 'wp_register_user_personal_data_exporter', 1 ); 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 * @since 4.9.6
* @access private * @access private
* *
* @param int $request_id The request ID being confirmed.
* @return string $message The confirmation message. * @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 ); $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 ) ) { if ( $request && in_array( $request->action_name, _wp_privacy_action_request_types(), true ) ) {
$message = '<p class="message">' . __( 'Action has been confirmed.' ) . '</p>'; if ( 'export_personal_data' === $request->action_name ) {
$message .= __( 'The site administrator has been notified and will fulfill your request as soon as possible.' ); $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; return $message;
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-alpha-43230'; $wp_version = '5.0-alpha-43232';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -890,7 +890,7 @@ switch ( $action ) {
*/ */
do_action( 'user_request_action_confirmed', $request_id ); 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_header( __( 'User action confirmed.' ), $message );
login_footer(); login_footer();