-
Notifications
You must be signed in to change notification settings - Fork 1
/
uninstall.php
38 lines (31 loc) · 942 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
<?php
if (
! defined( 'WP_UNINSTALL_PLUGIN' ) ||
! WP_UNINSTALL_PLUGIN ||
dirname( WP_UNINSTALL_PLUGIN ) != dirname( plugin_basename( __FILE__ ) )
) {
status_header( 404 );
exit;
}
/*
* Delete database
*/
define( 'PSK_S2MSFB_PLUGIN_FILE', __FILE__ );
require_once( 'inc/define.php' );
require( PSK_S2MSFB_INCLUDES_FOLDER . 'tools.class.php' );
require( PSK_S2MSFB_CLASSES_FOLDER . 'psk_s2msfb.class.php' );
PSK_S2MSFB::db_uninstall();
/*
* Delete options
*/
delete_option( PSK_S2MSFB_OPT_SETTINGS_NOTIFY );
delete_option( PSK_S2MSFB_OPT_SETTINGS_GENERAL );
/*
* Delete transients
*/
delete_transient( PSK_S2MSFB_WIDGET_DOWNLOAD_LATEST_ID );
delete_transient( PSK_S2MSFB_WIDGET_DOWNLOAD_TOP0_ID );
delete_transient( PSK_S2MSFB_WIDGET_DOWNLOAD_TOP1_ID );
delete_transient( PSK_S2MSFB_WIDGET_DOWNLOAD_TOP7_ID );
delete_transient( PSK_S2MSFB_WIDGET_DOWNLOAD_TOP31_ID );
delete_transient( PSK_S2MSFB_WIDGET_DOWNLOAD_TOP365_ID );