nitropack
Last commit date
classes
3 years ago
languages
3 years ago
nitropack-sdk
3 years ago
view
3 years ago
advanced-cache.php
3 years ago
batcache-compat.php
4 years ago
cf-helper.php
5 years ago
constants.php
3 years ago
diagnostics.php
3 years ago
functions.php
3 years ago
helpers.php
3 years ago
integrations.php
4 years ago
main.php
3 years ago
readme.txt
3 years ago
uninstall.php
3 years ago
wp-cli.php
3 years ago
uninstall.php
24 lines
| 1 | <?php |
| 2 | if (!defined('WP_UNINSTALL_PLUGIN')) { |
| 3 | die; |
| 4 | } |
| 5 | |
| 6 | $nitropackOptions = array('nitropack-siteId', 'nitropack-siteSecret', 'nitropack-enableCompression', 'nitropack-webhookToken', 'nitropack-checkedCompression', 'nitropack-cacheablePostTypes', 'nitropack-wcNotice', 'nitropack-safeModeStatus', 'nitropack-bbCacheSyncPurge'); |
| 7 | if (defined('MULTISITE') && MULTISITE) { |
| 8 | $blogs = array_map(function($blog) { return $blog->blog_id; }, get_sites()); |
| 9 | |
| 10 | foreach ($nitropackOptions as $optionName) { |
| 11 | foreach ($blogs as $blogId) { |
| 12 | delete_blog_option($blogId, $optionName); |
| 13 | } |
| 14 | } |
| 15 | } else { |
| 16 | foreach ($nitropackOptions as $optionName) { |
| 17 | delete_option($optionName); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | require_once 'nitropack-sdk/autoload.php'; |
| 22 | require_once 'constants.php'; |
| 23 | NitroPack\SDK\Filesystem::deleteDir(NITROPACK_DATA_DIR); |
| 24 |