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