PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 1.10
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v1.10
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / uninstall.php

uninstall.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 1.10, at uninstall.php

51 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'WP_UNINSTALL_PLUGIN' ) || die( 'Cheatin&#8217; uh?' );
3
4 global $wpdb;
5
6 // Delete Imagify options.
7 delete_site_option( 'imagify_settings' );
8 delete_site_option( 'imagify_old_version' );
9 delete_site_option( 'imagify_files_db_version' );
10 delete_site_option( 'imagify_folders_db_version' );
11 delete_option( 'imagify_data' );
12 delete_option( 'ngg_imagify_data_db_version' );
13 delete_option( $wpdb->prefix . 'ngg_imagify_data_db_version' );
14
15 // Delete all transients.
16 delete_site_transient( 'imagify_activation' );
17 delete_site_transient( 'imagify_check_licence_1' );
18 delete_site_transient( 'imagify_user' );
19 delete_site_transient( 'imagify_themes_plugins_to_sync' );
20 delete_site_transient( 'do_imagify_rating_cron' );
21 delete_site_transient( 'imagify_seen_rating_notice' );
22 delete_site_transient( 'imagify_user_images_count' );
23 delete_transient( 'imagify_activation' );
24 delete_transient( 'imagify_bulk_optimization_level' );
25 delete_transient( 'imagify_bulk_optimization_infos' );
26 delete_transient( 'imagify_large_library' );
27 delete_transient( 'imagify_max_image_size' );
28 delete_transient( 'imagify_user' );
29 delete_transient( 'imagify_stat_without_webp' );
30
31 // Delete transients.
32 $transients = implode( '" OR option_name LIKE "', array(
33 '\_transient\_%imagify-auto-optimize-%',
34 '\_transient\_%imagify\_rpc\_%',
35 '\_transient\_imagify\_%\_process\_locked',
36 '\_site\_transient\_imagify\_%\_process\_lock%',
37 ) );
38 $wpdb->query( "DELETE from $wpdb->options WHERE option_name LIKE \"$transients\"" ); // WPCS: unprepared SQL ok.
39
40 // Clear scheduled hooks.
41 wp_clear_scheduled_hook( 'imagify_rating_event' );
42 wp_clear_scheduled_hook( 'imagify_update_library_size_calculations_event' );
43
44 // Delete all user meta related to Imagify.
45 delete_metadata( 'user', '', '_imagify_ignore_notices', '', true );
46
47 // Drop the tables.
48 $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->base_prefix . 'imagify_files' );
49 $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->base_prefix . 'imagify_folders' );
50 $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'ngg_imagify_data' );
51