-
Notifications
You must be signed in to change notification settings - Fork 16
/
uninstaller.php
34 lines (32 loc) · 904 Bytes
/
uninstaller.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
<?php
/**
* Manage Geo Mashup uninstall.
*/
class GeoMashupUninstaller {
/**
* Drop Geo Mashup database tables.
*
* @since 1.3
*/
public function geo_mashup_uninstall_db() {
global $wpdb;
$tables = array( 'geo_mashup_administrative_names', 'geo_mashup_location_relationships', 'geo_mashup_locations' );
foreach ( $tables as $table ) {
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . $table );
}
}
/**
* Delete Geo Mashup saved options.
*
* @since 1.3
*/
public function geo_mashup_uninstall_options() {
delete_option( 'geo_mashup_temp_kml_url' );
delete_option( 'geo_mashup_db_version' );
delete_option( 'geo_mashup_activation_log' );
delete_option( 'geo_mashup_options' );
delete_option( 'geo_locations' );
// Leave the google_api_key option
// Still belongs to this site, and may be used by other plugins
}
}