-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathuninstall.php
More file actions
29 lines (21 loc) · 710 Bytes
/
uninstall.php
File metadata and controls
29 lines (21 loc) · 710 Bytes
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
<?php
//Exit if file called directly
if (! defined( 'ABSPATH' )) {
exit;
}
// De-activation
function course_certificate_segwitz_certificate_onDeactivation() {
if ( ! current_user_can( 'activate_plugins' ) ) return;
flush_rewrite_rules();
}
// Uninstall
register_uninstall_hook( __FILE__, 'course_certificate_drop_certificate_table' );
function course_certificate_drop_certificate_table(){
if ( ! current_user_can( 'activate_plugins' ) ) return;
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) exit ();
// global $wpdb;
// $table_name = $wpdb->prefix . 'e34s_clients';
// $sql = "DROP TABLE IF EXISTS inferno_course_certificates";
// $wpdb->query($sql);
// delete_option('e34s_time_card_version');
}