PluginProbe ʕ •ᴥ•ʔ
Custom Twitter Feeds – A Tweets Widget or X Feed Widget / trunk
Custom Twitter Feeds – A Tweets Widget or X Feed Widget vtrunk
2.6.1 2.6.0 1.0 1.0.1 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.2 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.4 1.4.1 1.5 1.5.1 1.6 1.6.1 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1 2.1.1 2.1.2 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.5.4 2.5.5 trunk
custom-twitter-feeds / uninstall.php
custom-twitter-feeds Last commit date
admin 3 weeks ago css 2 years ago img 4 years ago inc 3 weeks ago js 1 month ago languages 3 weeks ago templates 1 month ago vendor 3 weeks ago views 4 years ago README.md 3 months ago README.txt 3 weeks ago changelog.txt 1 month ago custom-twitter-feed.php 3 weeks ago uninstall.php 4 years ago
uninstall.php
83 lines
1 <?php
2 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
3 exit();
4 }
5
6 //If the user is preserving the settings then don't delete them
7 $options = get_option( 'ctf_options' );
8 $ctf_preserve_settings = isset( $options['preserve_settings'] ) ? $options['preserve_settings'] : false;
9
10 // allow the user to preserve their settings in case they are upgrading
11 if ( ! $ctf_preserve_settings ) {
12 // clean up options from the database
13 delete_option( 'ctf_options' );
14 delete_option( 'ctf_configure' );
15 delete_option( 'ctf_customize' );
16 delete_option( 'ctf_style' );
17 delete_option( 'ctf_statuses' );
18
19 delete_option( 'ctf_rating_notice' );
20 delete_option( 'ctf_notifications' );
21 delete_option( 'ctf_local_avatars' );
22
23 // delete tweet cache in transients
24 global $wpdb;
25 $table_name = $wpdb->prefix . "options";
26 $wpdb->query( "
27 DELETE
28 FROM $table_name
29 WHERE `option_name` LIKE ('%\_transient\_ctf\_%')
30 " );
31 $wpdb->query( "
32 DELETE
33 FROM $table_name
34 WHERE `option_name` LIKE ('%\_transient\_timeout\_ctf\_%')
35 " );
36
37 //Delete all persistent caches (start with ctf_!)
38 global $wpdb;
39 $table_name = $wpdb->prefix . "options";
40 $result = $wpdb->query("
41 DELETE
42 FROM $table_name
43 WHERE `option_name` LIKE ('%ctf\_\!%')
44 ");
45 delete_option( 'ctf_cache_list' );
46
47 // remove any scheduled cron jobs
48 wp_clear_scheduled_hook( 'ctf_cron_job' );
49
50 delete_option( 'ctf_usage_tracking_config' );
51 delete_option( 'ctf_usage_tracking' );
52
53 wp_clear_scheduled_hook( 'ctf_usage_tracking_cron' );
54 wp_clear_scheduled_hook( 'ctf_feed_update' );
55
56 delete_option( 'ctf_db_version' );
57 delete_option( 'ctf_ver' );
58 delete_option( 'ctf_welcome_seen' );
59 delete_option( 'ctf_rating_notice' );
60 delete_option( 'ctf_notifications' );
61 delete_option( 'ctf_newuser_notifications' );
62 delete_option( 'ctf_statuses' );
63 delete_option( 'ctf_cron_report' );
64 delete_option( 'ctf_legacy_feed_settings' );
65 delete_option( 'ctf_check_license_api_when_expires' );
66 delete_option( 'ctf_license_last_check_timestamp' );
67 delete_option( 'ctf_license_data' );
68 delete_option( 'ctf_license_key' );
69 delete_option( 'ctf_license_status' );
70
71 global $wpdb;
72
73 $locator_table_name = $wpdb->prefix . 'ctf_feed_locator';
74 $wpdb->query( "DROP TABLE IF EXISTS $locator_table_name" );
75
76 $feed_caches_table_name = $wpdb->prefix . 'ctf_feed_caches';
77 $wpdb->query( "DROP TABLE IF EXISTS $feed_caches_table_name" );
78
79 $feeds_table_name = $wpdb->prefix . 'ctf_feeds';
80 $wpdb->query( "DROP TABLE IF EXISTS $feeds_table_name" );
81 }
82
83