| 1 |
<?php |
| 2 |
/** |
| 3 |
* Pushly plugin uninstall handler. |
| 4 |
* |
| 5 |
* Drops the custom activity log table and removes all plugin settings. |
| 6 |
* This is a full uninstall — if the user re-installs, they start from a clean slate. |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
require_once __DIR__ . '/vendor/autoload.php'; |
| 14 |
|
| 15 |
// Drop the custom activity log table. |
| 16 |
$pushly_log_store = new \Pushly\Admin\LogStore(); |
| 17 |
$pushly_log_store->drop_table(); |
| 18 |
|
| 19 |
// Remove all plugin settings. |
| 20 |
delete_option( 'pushly' ); |
| 21 |
|