Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/generoi/wp-genero-gdpr
https://github.com/generoi/wp-genero-gdpr
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/generoi/wp-genero-gdpr
- Owner: generoi
- Created: 2018-05-08T17:14:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-11T14:55:58.000Z (over 6 years ago)
- Last Synced: 2024-04-16T22:30:13.084Z (7 months ago)
- Language: PHP
- Size: 121 KB
- Stars: 3
- Watchers: 17
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wp-genero-gdpr
> Various tools for becoming GDPR complaint
## Requirements
- For encrypting gravityform submission fields you need either PHP 7.0 with the PECL libsodium extension or PHP 7.2+
## Features
- Expire gravityfrom submissions (defaults to all forms with 1 year but can be changed on a per-form basis)
- Encrypt gravityform submission entries## Installation
### Form submission encryption
When the plugin is first installed a key-pair is automatically generated. Follow the instructions and add the required defines to `wp-config.php`
```php
define('GENERO_GDPR_ENCRYPT_ENABLED', true);
define('GENERO_GDPR_PUBLIC_KEY', $root_dir . '/genero-gdpr.public.key');
```If the key-pair wasn't saved you can manually generate a new key-pair by running `composer run generate-keys` in the plugin directory. Move the generated `genero-gdpr.public.key` to place and add it to `wp-config.php`.
**WARNING! If you lose the private key and have encryption enabled it will be impossible to recover the data.**
## API
```php
// Change the default expiration time of gravityform submissions
add_filter('wp-genero-gdpr/expire-submissions/default_expiration_time', function ($time) {
return '3 months';
});// Override the expiration time of gravityform submissions
add_filter('wp-genero-gdpr/expire-submissions/expiration_time', function ($time) {
return '1 day';
});// Change the amount of submissions that are deleted at a time
add_filter('wp-genero-gdpr/expire-submissions/pager', function ($pager) {
return 50;
});
```## Development
Install dependencies
composer install
Generate a new key-pair
composer run generate-keys