-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.php
40 lines (35 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
33
34
35
36
37
38
39
40
<?php
if (!defined('WP_UNINSTALL_PLUGIN')) {
die('Direct access not allowed');
}
/**
* Class MTCaptchaUninstall
*/
class MTCaptchaUninstall
{
/**
* MTCaptchaUninstall constructor.
*/
public function __construct()
{
$this->mt_captcha_delete([
"mt_site_private_key",
"mt_captcha_enable",
"mt_captcha_disable_mtcaptcha",
"mt_captcha_show_captcha_label_form",
"mt_site_key",
"mt_captcha_theme",
"mt_captcha_lang",
"mt_captcha_widget_size",
"mt_captcha_enable_json_value",
"mt_captcha_json_value"
]);
}
private function mt_captcha_delete($array)
{
foreach ($array as $item) {
delete_option(sprintf('mtcaptcha_%s', $item));
}
}
}
new MTCaptchaUninstall();