Files
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

49 lines
1.0 KiB
PHP

<?php
/*
http://codex.wordpress.org/Function_Reference/register_uninstall_hook#uninstall.php
Please note: Due to the uninstall procedure of WordPress you have to delete left-over database entries in multisite environments manually for each blog.
*/
/*
security check
*/
if (!defined( 'WP_UNINSTALL_PLUGIN'))
wp_die(__('You are not allowed to uninstall plugins on this site.'), '', array('response' => 403));
if (!current_user_can('manage_options'))
wp_die(__('You do not have sufficient permissions to manage options for this site.'), '', array('response' => 403));
/*
delete option-array
*/
delete_option('timezonecalculator');
/*
delete widget-options
*/
delete_option('widget_timezonecalculator');
/*
delete calculator user-settings
*/
global $wpdb;
$q = "DELETE FROM $wpdb->usermeta WHERE $wpdb->usermeta.meta_key LIKE '%timezonecalculator_timezones%'";
$wpdb->query($q);
/*
delete timezones-cache transients
*/
$transient_name='timezonecalculator_js_array_'.get_locale();
delete_transient($transient_name);
delete_transient($transient_name.'_etc');