-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.php
43 lines (37 loc) · 1003 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
41
42
43
<?php
namespace Wp_Motive;
/**
* Fired when the plugin is uninstalled.
*
*
* @link http://behstant.com/blog
* @since 1.0.0
* @since 29-Nov-2019
* @author Israel Barragan (Reedyseth) <[email protected]>
*
* @package Wp_Motive
*/
// If uninstall not called from WordPress, then exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
// Delete Plugin Options
class Wp_Motive_Uninstall
{
private $options;
private $options_prefix = 'wp_motive_';
public function __construct()
{
// Get Plugin Options
}
public function delete_options()
{
// Delete Plugin Options
delete_option( $this->options_prefix . 'request_period' );
delete_option( $this->options_prefix . 'data_loaded_status' );
delete_option( $this->options_prefix . 'cache_users_data' );
delete_option( $this->options_prefix . 'users_data_override' );
}
}
$instance = new Wp_Motive_Uninstall();
$instance->delete_options();