-
Notifications
You must be signed in to change notification settings - Fork 4
/
uninstall.php
executable file
·28 lines (23 loc) · 985 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
<?php
// If uninstall not called from WordPress, then exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
if( is_admin() ) {
global $wpdb;
$plugin_name = 'reatlat_cub';
if ( ! get_option( $plugin_name . '_keep_settings' ) )
{
$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . $plugin_name . '_links' );
$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . $plugin_name . '_mediums' );
$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . $plugin_name . '_sources' );
delete_option( $plugin_name . '_version' );
delete_option( $plugin_name . '_advanced_api' );
delete_option( $plugin_name . '_bitly_api_key' );
delete_option( $plugin_name . '_google_api_key' );
delete_option( $plugin_name . '_admin_only' );
// delete_option( $plugin_name . '_keep_settings' );
delete_option( $plugin_name . '_show_creator' );
delete_option( $plugin_name . '_show_useronly' );
}
}