-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.php
More file actions
30 lines (24 loc) · 823 Bytes
/
Copy pathuninstall.php
File metadata and controls
30 lines (24 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
declare(strict_types=1);
defined('WP_UNINSTALL_PLUGIN') || exit;
if(PHP_VERSION_ID < 80300)
{
return;
}
// WordPress includes this file alone, never the plugin's main file: the
// plugin's classes load the way ovos-codesafe.php loads them
spl_autoload_register(static function ($class) {
if(strpos($class, 'Ovos\\Codesafe\\') !== 0)
{
return;
}
$file = __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 14)) . '.php';
if(is_file($file))
{
require $file;
}
});
// every option and transient on every site, and the store with the visitors'
// addresses in its queues (security audit 2026-10-03 M16); a stub PHP still
// prepends stays, doing nothing, until the auto_prepend_file line is removed
Ovos\Codesafe\Lifecycle::uninstall();