| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Fired when the plugin is uninstalled. |
| 5 |
* |
| 6 |
* @package PT |
| 7 |
* @author David de Boer <david@davdeb.com> |
| 8 |
*/ |
| 9 |
|
| 10 |
// If uninstall, not called from WordPress, then exit. |
| 11 |
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
$pt_general = get_option( 'pt_settings_default' ); |
| 16 |
|
| 17 |
if ( empty( $pt_general['uninstall_save_settings'] ) ) { |
| 18 |
delete_option( 'pt_settings_master' ); |
| 19 |
delete_option( 'pt_settings_default' ); |
| 20 |
delete_option( 'pt_settings_keys' ); |
| 21 |
delete_option( 'pt_show_admin_notice_setup_wizard' ); |
| 22 |
delete_option( 'pt_show_admin_notice_newsletter' ); |
| 23 |
delete_option( 'pt_show_admin_notice_extensions' ); |
| 24 |
delete_option( 'pt_has_run' ); |
| 25 |
delete_option( 'pt_version' ); |
| 26 |
delete_option( 'pt_upgrade_has_run' ); |
| 27 |
delete_option( 'pt_settings_licenses' ); |
| 28 |
delete_option( 'pt_licenses' ); |
| 29 |
} |
| 30 |
|