| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('WP_UNINSTALL_PLUGIN')) |
| 4 |
wp_die(__('Plugin uninstallation can not be executed in this fashion.')); |
| 5 |
|
| 6 |
global $wpdb; |
| 7 |
|
| 8 |
// delete_option('vimeography_advanced_settings'); |
| 9 |
// delete_option('vimeography_default_settings'); |
| 10 |
// delete_option('vimeography_db_version'); |
| 11 |
|
| 12 |
// $wpdb->query('DROP TABLE '.$wpdb->prefix.'vimeography_gallery, '.$wpdb->prefix.'vimeography_gallery_meta'); |
| 13 |
|
| 14 |
// $wpdb->query('DELETE a, b |
| 15 |
// FROM |
| 16 |
// wp_options a, wp_options b |
| 17 |
// WHERE |
| 18 |
// a.option_name LIKE "_transient_vimeography_%" AND |
| 19 |
// b.option_name LIKE "_transient_timeout_vimeography_%"; |
| 20 |
// '); |
| 21 |
|
| 22 |
// Hell, let's do the user a favor by cleaning up ALL stale transients. |
| 23 |
|
| 24 |
$wpdb->query('DELETE a, b |
| 25 |
FROM |
| 26 |
wp_options a, wp_options b |
| 27 |
|
| 28 |
WHERE |
| 29 |
a.option_name LIKE "_transient_%" AND |
| 30 |
a.option_name NOT LIKE "_transient_timeout_%" AND |
| 31 |
b.option_name = CONCAT( |
| 32 |
"_transient_timeout_", |
| 33 |
SUBSTRING( |
| 34 |
a.option_name, |
| 35 |
CHAR_LENGTH("_transient_") + 1 |
| 36 |
) |
| 37 |
) |
| 38 |
AND b.option_value < UNIX_TIMESTAMP(); |
| 39 |
'); |
| 40 |
|
| 41 |
$wpdb->query('DELETE a, b |
| 42 |
FROM |
| 43 |
wp_options a, wp_options b |
| 44 |
|
| 45 |
WHERE |
| 46 |
a.option_name LIKE "_site_transient_%" AND |
| 47 |
a.option_name NOT LIKE "_site_transient_timeout_%" AND |
| 48 |
b.option_name = CONCAT( |
| 49 |
"_site_transient_timeout_", |
| 50 |
SUBSTRING( |
| 51 |
a.option_name, |
| 52 |
CHAR_LENGTH("_site_transient_") + 1 |
| 53 |
) |
| 54 |
) |
| 55 |
AND b.option_value < UNIX_TIMESTAMP() |
| 56 |
'); |