real-cookie-banner
Last commit date
inc
3 years ago
languages
3 years ago
public
3 years ago
vendor
3 years ago
CHANGELOG.md
3 years ago
LICENSE
5 years ago
LICENSE_3RD_PARTY_JS.md
5 years ago
LICENSE_3RD_PARTY_PHP.md
3 years ago
README.txt
3 years ago
index.php
3 years ago
uninstall.php
5 years ago
wpml-config.xml
5 years ago
uninstall.php
43 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This file is automatically requested when the uninstalls the plugin. |
| 4 | * |
| 5 | * @see https://developer.wordpress.org/plugins/the-basics/uninstall-methods/ |
| 6 | */ |
| 7 | |
| 8 | use DevOwl\RealCookieBanner\Activator; |
| 9 | |
| 10 | if (!defined('WP_UNINSTALL_PLUGIN')) { |
| 11 | exit(); // Remove if you want to do some tests locally! |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Uninstall our plugin! For the first, it is completely OK to just remove filesystem |
| 16 | * files. Database and options will be added soon...! |
| 17 | */ |
| 18 | function rcb_uninstall() { |
| 19 | // require_once '../../../wp-load.php'; // Just for testing purposes, remove me! |
| 20 | |
| 21 | if (!defined('RCB_FILE')) { |
| 22 | // ported from index.php |
| 23 | define('RCB_FILE', dirname(__FILE__) . '/index.php'); |
| 24 | define('RCB_PATH', dirname(RCB_FILE)); |
| 25 | define('RCB_ROOT_SLUG', 'devowl-wp'); |
| 26 | define('RCB_SLUG', basename(RCB_PATH)); |
| 27 | define('RCB_INC', trailingslashit(path_join(RCB_PATH, 'inc'))); |
| 28 | define('RCB_MIN_PHP', '7.2.0'); |
| 29 | define('RCB_MIN_WP', '5.2.0'); |
| 30 | define('RCB_NS', 'DevOwl\\RealCookieBanner'); |
| 31 | define('RCB_DB_PREFIX', 'rcb'); |
| 32 | define('RCB_OPT_PREFIX', 'rcb'); |
| 33 | define('RCB_SLUG_CAMELCASE', lcfirst(str_replace('-', '', ucwords(RCB_SLUG, '-')))); |
| 34 | } |
| 35 | |
| 36 | // Require autoloader so we can use functions and classes |
| 37 | require_once RCB_INC . 'base/others/start.php'; |
| 38 | |
| 39 | Activator::uninstall(); |
| 40 | } |
| 41 | |
| 42 | rcb_uninstall(); |
| 43 |