-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.php
45 lines (39 loc) · 3.26 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* Trigger this file on Plugin uninstall
*
* @package SeersCookieConsentBannerPrivacyPolicyPlugin
*/
if ( ! defined('WP_UNINSTALL_PLUGIN')) {
die;
}
//clear Database stored Data
//Access the database via SQL
global $wpdb;
$prefix = $wpdb->prefix;
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_id'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_msg'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_url'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_email'"));
/*** Code added on 10-06-2012 ********/
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_policy_declaration_url'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_enable_policy'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_is_active'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_cookies_expiry'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_lang'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_show_badge'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_agree_btn_color'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_disagree_btn_color'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_preferences_btn_color'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_banner_bg_color'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_body_text_color'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_agree_text_color'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_disagree_text_color'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_preferences_text_color'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_body_text'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_accept_btn_text'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_reject_btn_text'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_setting_btn_text'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_font_style'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_font_size'"));
$wpdb->query($wpdb->prepare("DELETE FROM ".$prefix."options WHERE option_name = 'SCCBPP_cookie_consent_button_type'"));