-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathuninstall.php
More file actions
22 lines (18 loc) · 658 Bytes
/
uninstall.php
File metadata and controls
22 lines (18 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
* @package matomo
*/
// if uninstall.php is not called by WordPress, die.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
die;
}
require 'shared.php';
$matomo_is_using_multi_site = function_exists( 'is_multisite' ) && is_multisite();
$matomo_settings = new \WpMatomo\Settings();
$matomo_should_remove_all_data = $matomo_settings->should_delete_all_data_on_uninstall();
$matomo_uninstaller = new \WpMatomo\Uninstaller();
$matomo_uninstaller->uninstall( $matomo_should_remove_all_data );