-
Notifications
You must be signed in to change notification settings - Fork 1
/
uninstall.php
32 lines (26 loc) · 951 Bytes
/
uninstall.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* Trigger this file when user uninstall plugin
*
* @package MyPrivacyPolicy
*
*/
// security check - prevent access fro outside of wordpress
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
die;
}
function jlplg_lovecoding_delete_settings() {
delete_option( 'jlplg_prvpol-field1-cookie-message' );
delete_option( 'jlplg_prvpol-field2-checkbox-privacy-policy' );
delete_option( 'jlplg_prvpol-field3-cookie-button-text' );
delete_option( 'jlplg_prvpol-field4-background-color' );
delete_option( 'jlplg_prvpol-field5-text-color' );
delete_option( 'jlplg_prvpol-field6-button-background-color' );
delete_option( 'jlplg_prvpol-field7-button-text-color' );
}
jlplg_lovecoding_delete_settings();
function jlplg_lovecoding_delete_cookies() {
unset( $_COOKIE['cookie-accepted'] );
setcookie( sanitize_key( 'cookie-accepted' ), '', 1);
}
jlplg_lovecoding_delete_cookies();