| 1 |
<?php |
| 2 |
// If uninstall not called from WordPress exit |
| 3 |
defined( 'WP_UNINSTALL_PLUGIN' ) or die( 'Cheatin’ uh?' ); |
| 4 |
|
| 5 |
// Delete Imagify options |
| 6 |
delete_site_option( 'imagify_settings' ); |
| 7 |
|
| 8 |
// Delete all transients |
| 9 |
delete_site_transient( 'imagify_check_licence_1' ); |
| 10 |
delete_site_transient( 'imagify_bulk_optimization_level' ); |
| 11 |
delete_site_transient( 'imagify_large_library' ); |
| 12 |
|
| 13 |
global $wpdb; |
| 14 |
// WP transients |
| 15 |
$wpdb->query( 'DELETE from ' . $wpdb->options . ' WHERE option_name LIKE "_transient_imagify-async-in-progress-%"' ); |
| 16 |
|
| 17 |
// NextGen Gallery transients |
| 18 |
$wpdb->query( 'DELETE from ' . $wpdb->options . ' WHERE option_name LIKE "_transient_imagify-ngg-async-in-progress-%"' ); |
| 19 |
|
| 20 |
// Delete all user meta related to Imagify |
| 21 |
delete_metadata( 'user', '', '_imagify_ignore_notices', '', true ); |
| 22 |
|
| 23 |
// Drop the tables |
| 24 |
$wpdb->query( "DROP TABLE IF EXISTS $wpdb->ngg_imagify_data" ); |
| 25 |
|