| 1 |
<?php |
| 2 |
/** |
| 3 |
* Uninstall routine for the AI plugin. |
| 4 |
* |
| 5 |
* Runs only when the plugin is deleted (not on deactivation). Data is removed by |
| 6 |
* default; sites can opt out via the "wpai_remove_data_on_uninstall" filter. |
| 7 |
* |
| 8 |
* @package WordPress\AI |
| 9 |
*/ |
| 10 |
|
| 11 |
declare( strict_types=1 ); |
| 12 |
|
| 13 |
namespace WordPress\AI; |
| 14 |
|
| 15 |
use WordPress\AI\Admin\Uninstall; |
| 16 |
|
| 17 |
defined( 'WP_UNINSTALL_PLUGIN' ) || exit; |
| 18 |
|
| 19 |
// Load the autoloader so the Uninstall class can be resolved. The plugin itself |
| 20 |
// is not bootstrapped during uninstall, so we avoid loading ai.php. |
| 21 |
require_once __DIR__ . '/includes/autoload.php'; |
| 22 |
|
| 23 |
Uninstall::run(); |
| 24 |
|