v1.0.0
This commit is contained in:
parent
8caa140991
commit
5cdf7f48e5
29 changed files with 6526 additions and 0 deletions
24
uninstall.php
Normal file
24
uninstall.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/**
|
||||
* Plugin uninstall handler.
|
||||
*
|
||||
* Executed when the plugin is deleted from the WordPress admin.
|
||||
* By default, all plugin data is preserved on uninstall. Users can opt in
|
||||
* to data deletion via the plugin settings screen (network option
|
||||
* `mlp_migrator_delete_on_uninstall`, default: false).
|
||||
*
|
||||
* @package Robotstxt_Mlp2_Mlp5
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) || ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/includes/class-robotstxt-mlp2-mlp5-logger.php';
|
||||
|
||||
// Only delete data when the user has explicitly opted in.
|
||||
if ( get_site_option( 'mlp_migrator_delete_on_uninstall', false ) ) {
|
||||
Robotstxt_Mlp2_Mlp5_Logger::drop_table();
|
||||
delete_site_option( 'mlp_migrator_delete_on_uninstall' );
|
||||
delete_site_option( 'mlp_migrator_wizard_state' );
|
||||
}
|
||||
Loading…
Reference in a new issue