_wp_privacy_action_request_types example


function _wp_privacy_account_request_confirmed_message( $request_id ) {
    $request = wp_get_user_request( $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 ( '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. */

                }
                $action_type               = sanitize_text_field( wp_unslash( $_POST['type_of_action'] ) );
                $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_for_privacy_request'] ) );
                $email_address             = '';
                $status                    = 'pending';

                if ( ! isset( $_POST['send_confirmation_email'] ) ) {
                    $status = 'confirmed';
                }

                if ( ! in_array( $action_type_wp_privacy_action_request_types(), true ) ) {
                    add_settings_error(
                        'action_type',
                        'action_type',
                        __( 'Invalid personal data action.' ),
                        'error'
                    );
                }

                if ( ! is_email( $username_or_email_address ) ) {
                    $user = get_user_by( 'login', $username_or_email_address );
                    if ( ! $user instanceof WP_User ) {
                        
Home | Imprint | This part of the site doesn't use cookies.