-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuninstall.php
54 lines (41 loc) · 1.47 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
46
47
48
49
50
51
52
53
54
<?php
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit();
} else {
nubuilderCleanUpTables();
}
function nubuilderCleanUpTables() {
global $wpdb;
$nubuilder_tables = array();
$nubuilder_tables[] = 'zzzzsys_access';
$nubuilder_tables[] = 'zzzzsys_access_form';
$nubuilder_tables[] = 'zzzzsys_access_php';
$nubuilder_tables[] = 'zzzzsys_access_report';
$nubuilder_tables[] = 'zzzzsys_browse';
$nubuilder_tables[] = 'zzzzsys_debug';
$nubuilder_tables[] = 'zzzzsys_event';
$nubuilder_tables[] = 'zzzzsys_file';
$nubuilder_tables[] = 'zzzzsys_form';
$nubuilder_tables[] = 'zzzzsys_format';
$nubuilder_tables[] = 'zzzzsys_object';
$nubuilder_tables[] = 'zzzzsys_php';
$nubuilder_tables[] = 'zzzzsys_report';
$nubuilder_tables[] = 'zzzzsys_select';
$nubuilder_tables[] = 'zzzzsys_select_clause';
$nubuilder_tables[] = 'zzzzsys_session';
$nubuilder_tables[] = 'zzzzsys_setup';
$nubuilder_tables[] = 'zzzzsys_tab';
$nubuilder_tables[] = 'zzzzsys_table';
$nubuilder_tables[] = 'zzzzsys_timezone';
$nubuilder_tables[] = 'zzzzsys_translate';
$nubuilder_tables[] = 'zzzzsys_user';
// drop tables
for ( $x=0; $x<count($nubuilder_tables); $x++ ) {
$nubuilder_table = $nubuilder_tables[$x];
$nubuilder_drop_table_sql = "DROP TABLE IF EXISTS `$nubuilder_table` ";
$wpdb->query($nubuilder_drop_table_sql);
}
// drop views
$wpdb->query("DROP VIEW `zzzzsys_report_data`, `zzzzsys_run_list");
}
?>