Make WordPress Core

Ticket #43970: 43970.2.diff

File 43970.2.diff, 4.0 KB (added by desrosj, 6 years ago)
  • src/wp-admin/css/login.css

     
    4949}
    5050
    5151.login .message,
     52.login .success,
    5253.login #login_error {
    5354        border-left: 4px solid #00a0d2;
    5455        padding: 12px;
     
    5859        box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    5960}
    6061
     62.login .success {
     63        border-left-color: #46b450;
     64}
     65
    6166.login #login_error {
    6267        border-left-color: #dc3232;
    6368}
  • src/wp-includes/default-filters.php

     
    350350// Privacy
    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' );
    356355add_filter( 'wp_privacy_personal_data_exporters', 'wp_register_user_personal_data_exporter', 1 );
  • src/wp-includes/user.php

     
    30723072 * @since 4.9.6
    30733073 * @access private
    30743074 *
     3075 * @param int $request_id The request ID being confirmed.
    30753076 * @return string $message The confirmation message.
    30763077 */
    3077 function _wp_privacy_account_request_confirmed_message( $message, $request_id ) {
     3078function _wp_privacy_account_request_confirmed_message( $request_id ) {
    30783079        $request = wp_get_user_request_data( $request_id );
    30793080
     3081        $message = '<p class="success">' . __( 'Action has been confirmed.' ) . '</p>';
     3082        $message .= '<p>' . __( 'The site administrator has been notified and will fulfill your request as soon as possible.' ) . '</p>';
     3083
    30803084        if ( $request && in_array( $request->action_name, _wp_privacy_action_request_types(), true ) ) {
    3081                 $message  = '<p class="message">' . __( 'Action has been confirmed.' ) . '</p>';
    3082                 $message .= __( 'The site administrator has been notified and will fulfill your request as soon as possible.' );
     3085                if ( 'export_personal_data' === $request->action_name ) {
     3086                        $message = '<p class="success">' . __( 'Thanks for confirming your export request.' ) . '</p>';
     3087                        $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>';
     3088                } elseif ( 'remove_personal_data' === $request->action_name ) {
     3089                        $message = '<p class="success">' . __( 'Thanks for confirming your erasure request.' ) . '</p>';
     3090                        $message .= '<p>' . __( 'The site administrator has been notified. You will receive an email confirmation when they erase your data.' ) . '</p>';
     3091                }
    30833092        }
    30843093
     3094        /**
     3095         * Filters the message displayed to a user when they confirm a data request.
     3096         *
     3097         * @since 4.9.6
     3098         *
     3099         * @param string $message    The message to the user.
     3100         * @param int    $request_id The ID of the request being confirmed.
     3101         */
     3102        $message = apply_filters( 'user_request_action_confirmed_message', $message, $request_id );
     3103
    30853104        return $message;
    30863105}
    30873106
  • src/wp-login.php

     
    890890                 */
    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 );
    896896                login_footer();