├── index.php
├── assets
├── index.php
├── icon-128x128.png
├── icon-256x256.png
├── screenshot-1.png
├── screenshot-2.png
├── screenshot-3.png
├── screenshot-4.png
├── screenshot-5.png
├── screenshot-6.png
├── screenshot-7.Png
├── screenshot-8.png
├── screenshot-9.png
├── banner-772x250.png
├── screenshot-10.png
├── screenshot-11.png
└── banner-1544x500.png
├── public
├── index.php
├── css
│ ├── index.php
│ └── public.css
├── js
│ ├── index.php
│ ├── gdrf-public.js
│ └── block.js
├── shortcode.php
├── enqueues.php
├── public.php
├── block.php
├── widget.php
└── hook.php
├── includes
├── index.php
└── data-request.php
├── gdpr-data-request-form.php
├── data-request.php
├── README.MD
├── README.txt
└── LICENSE.txt
/index.php:
--------------------------------------------------------------------------------
1 | ' + gdrf_localize.gdrf_errors + '
' + response.data + '' );
22 | $( '.gdrf-errors' ).slideDown();
23 | } else {
24 | $( '#gdrf-form' ).append( '
' . esc_html( $instance['text'] ) . '
'; 39 | } 40 | $params = array(); 41 | if ( isset( $instance['request_type'] ) ) { 42 | if ( 'export' === $instance['request_type'] ) { 43 | $params['request_type'] = 'export'; 44 | } elseif ( 'remove' === $instance['request_type'] ) { 45 | $params['request_type'] = 'remove'; 46 | } 47 | } 48 | echo gdrf_data_request_form( $params ); 49 | 50 | } 51 | 52 | public function form( $instance ) { 53 | $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : ''; 54 | $text = ( ! empty( $instance['text'] ) ) ? $instance['text'] : ''; 55 | $request_type = ( ! empty( $instance['request_type'] ) ) ? $instance['request_type'] : ''; 56 | 57 | ?> 58 | 59 |60 | 61 | 62 |
63 |64 | 65 | 66 |
67 |68 | 69 | 74 |
75 | 76 | 'gdrf-form', 34 | 'label_select_request' => esc_html__( 'Select your request:', 'gdpr-data-request-form' ), 35 | 'label_select_export' => esc_html__( 'Export Personal Data', 'gdpr-data-request-form' ), 36 | 'label_select_remove' => esc_html__( 'Remove Personal Data', 'gdpr-data-request-form' ), 37 | 'label_input_email' => esc_html__( 'Your email address (required)', 'gdpr-data-request-form' ), 38 | 'label_input_captcha' => esc_html__( 'Human verification (required):', 'gdpr-data-request-form' ), 39 | 'value_submit' => esc_html__( 'Send Request', 'gdpr-data-request-form' ), 40 | 'request_type' => 'both', 41 | ); 42 | 43 | // Filter string array 44 | $args = wp_parse_args( $args, array_merge( $defaults, apply_filters( 'privacy_data_request_form_defaults', $defaults ) ) ); 45 | 46 | // Check is 4.9.6 Core function wp_create_user_request() exists 47 | if ( function_exists( 'wp_create_user_request' ) ) { 48 | 49 | // Display the form 50 | ob_start(); 51 | ?> 52 | 98 | Front End User Initiated Requests (Feature Plugin) 14 | > 15 | > In 4.9.6, the ability for an administrator to initiate a data export or data erasure for a user by email address was added. While this provided sites with the tools to be compliant with new laws and regulations, site owners are still left to find a way to accommodate those requests. Adding a way for users to initiate this request on their own would prove a more “out of the box” experience and decrease the burden on site administrators to initiate these requests themselves. 16 | > Related tickets: #44013 17 | 18 | ## Features 🛠 19 | 20 | - ✅ PHP Function to display the Privacy Data Request Form: `wp_get_privacy_data_request_form()` 21 | - ✅ Shortcode 22 | - ✅ Widget 23 | - ✅ Filters to handle strings customization 24 | - ✅ Possibility to choose either to show remove request, export request, or both in PHP Function 25 | - ✅ Possibility to choose either to show remove request, export request, or both in Widget 26 | - ✅ Filter Documentation 27 | - ✅ CSS classes documentation 28 | - ✅ Gutenberg Block 29 | - ✅ Possibility to choose either to show remove request, export request, or both in Gutenberg Block 30 | 31 | ## Contributors 👥 32 | 33 | - audrasjb 34 | - whodunitagency 35 | - xkon 36 | - WordPress Core Privacy Team 37 | 38 | ## Documentation 📚 39 | 40 | ### Function: `wp_get_privacy_data_request_form()` 41 | 42 | `$args` (array) An array of default Privacy Data Request Form arguments. Default: None. 43 | 44 | Default parameters: see Filter/Parameters section below. 45 | 46 | ### Filter: `privacy_data_request_form_defaults` 47 | 48 | #### Description 49 | 50 | `privacy_data_request_form_defaults` filters the default form output arguments. It is part of the function `gdrf_data_request_form( $args )`. 51 | 52 | #### Parameters 53 | 54 | `$args` (array) (required) An array of default Privacy Data Request Form arguments. Default: None. 55 | 56 | The defaults set in the `gdrf_data_request_form( $args )` function are as follows: 57 | 58 | $defaults = array( 59 | 'form_id' => 'gdrf-form', 60 | 'label_select_request' => esc_html__( 'Select your request:', 'gdpr-data-request-form' ), 61 | 'label_select_export' => esc_html__( 'Export Personal Data', 'gdpr-data-request-form' ), 62 | 'label_select_remove' => esc_html__( 'Remove Personal Data', 'gdpr-data-request-form' ), 63 | 'label_input_email' => esc_html__( 'Your email address (required)', 'gdpr-data-request-form' ), 64 | 'label_input_captcha' => esc_html__( 'Human verification (required):', 'gdpr-data-request-form' ), 65 | 'value_submit' => esc_html__( 'Send Request', 'gdpr-data-request-form' ), 66 | 'request_type' => 'both', 67 | ); 68 | 69 | #### Example 70 | 71 | ``` 72 | add_filter( 'privacy_data_request_form_defaults', 'my_privacy_form' ); 73 | function my_privacy_form() { 74 | $args = array( 75 | 'form_id' => 'my_privacy_form_id' 76 | 'label_select_request' => 'Please select a request', 77 | 'label_select_export' => 'Export', 78 | 'label_select_remove' => 'Delete', 79 | 'label_input_captcha' => 'Please prove you’re a human:', 80 | 'value_submit' => 'Send your request', 81 | 'request_type' => 'export', 82 | ); 83 | return $args; 84 | } 85 | ``` 86 | 87 | ## Screenshots 🖼 88 | 89 | ### Gutenberg Block 90 | 91 | Block available in Widget category: 92 | 93 |  94 | 95 | Block rendering in Post/Page back-end: 96 | 97 |  98 | 99 | ### Admin Widget in the Widgets Screen 100 | 101 |  102 | 103 | ### Public Widget Rendering in Twenty Nineteen (default styles) 104 | 105 |  106 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | === GDPR Data Request Form === 2 | Contributors: audrasjb,whodunitagency,xkon 3 | Tags: GDPR, RGPD, Gutenberg, block, privacy, form, data request, export, personal data 4 | Requires at least: 4.9.6 5 | Tested up to: 5.4 6 | Requires PHP: 5.6 7 | Stable tag: 1.4.2 8 | License: GPLv2 or later 9 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 | 11 | Use WordPress Core GDPR tools to build front-end Personal Data export/erasure forms (includes Widget, Gutenberg Block, shortcode & Hooks). 12 | 13 | == Description == 14 | 15 | This plugin uses WordPress Core tools for GDPR Compliance. 16 | 17 | Since release 4.9.6, WordPress admin has some tools to handle Privacy User Requests. Administrators are able to create Data Request for every users in order to send or erase users data. This plugin allow website administrators to display Data Request Forms in front-end, for example in your Privacy Policy Page. 18 | 19 | Easily integrate a Personal Data Request Form for your visitors/users in front-end, with some options: 20 | - Personal Data Export 21 | - Personal Data Erasure 22 | - Both of them 23 | 24 | It’s easy to integrate: 25 | 26 | - **Widget** 27 | The widget allows to integrate Data Request Form in your theme widget areas. It comes with three options: Form Title, Form Description Paragraph and Form Type. 28 | 29 | - **Gutenberg Block** (since 1.4!) 30 | The Gutenberg Block make it even easier to integrate front-end forms in your website. The block allows you to choose the type of form you need. 31 | 32 | - **Shortcode** 33 | `[gpdr-data-request]` shortcode allows to integrate Data Request Form where you need. This shortcode has no parameter. 34 | 35 | - **PHP Function** 36 | `echo gdrf_data_request_form( $args )` function allows to integrate Data Request Form where you need. This function has some parameters and filters (see FAQ section below). Don’t forget to `echo` the function. 37 | 38 | GDPR Data Request Form is using AJAX to provide clean and user-friendly forms in front-end. You can integrate them in any page of your website (like your Privacy Policy Page) or in your sidebar/footer. 39 | 40 | **CAUTION: You need WordPress 4.9.6 at least to use this plugin!** 41 | 42 | **Data Request Workflow:** 43 | 44 | - The user/visitor use your Personal Data Request Form to ask for Personal Data Export or Erasure. 45 | - A request is created in WordPress Tools > Export/Erase personal data. 46 | - An email is sent to the user/visitor to confirm this request. 47 | - The user request is set to Confirmed in Tools > Export/Erase personal data. 48 | - An email is sent to the website administrator to validate the request. 49 | - The personal data are sent by email to the user/visitor (as a 3-day available download link), or erased, depending on the user request type. 50 | 51 | == Installation == 52 | 1. Upload this plugin folder to the `/wp-content/plugins/` directory 53 | 2. Activate the plugin through "Plugins" WordPress menu: That's all, there is no settings! 54 | 3. To display Data Request Form, use our shortcode `[gpdr-data-request]` in your posts/pages or use our Widget `GDPR Data Request Form` available on "Widgets" Screen. 55 | 56 | == Frequently Asked Questions == 57 | 58 | = Prerequisites = 59 | 60 | **You need WordPress 4.9.6 at least to use this plugin.** 61 | 62 | = Data Request Workflow = 63 | 64 | - The user/visitor use your Personal Data Request Form to ask for Personal Data Export or Erasure. 65 | - A `request` is created in WordPress Tools > Export/Erase personal data. 66 | - An email is sent to the user to confirm this request. 67 | - The user request is set to Confirmed in WordPress Tools > Export/Erase personal data. 68 | - An email is sent to the website administrator to validate the request. 69 | - The personal data are sent by email to the user/visitor (as a 3-day available download link), or erased, depending on the user request type. 70 | 71 | = How to display Data Request Forms using the shortcode? = 72 | 73 | Use our shortcode `[gdpr-data-request]` in your posts or pages. 74 | 75 | = How to display Data Request Forms using the PHP function? = 76 | 77 | Use our function: `echo gdrf_data_request_form()` in your theme/child theme. 78 | This function has some parameters: 79 | 80 | 'form_id' (type String): ID of the