aruba-hispeed-cache
Last commit date
admin
3 months ago
assets
3 months ago
languages
3 months ago
src
3 months ago
aruba-hispeed-cache.php
3 months ago
index.php
3 months ago
readme.txt
3 months ago
uninstall.php
3 months ago
uninstall.php
34 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Manages the uninstallation process of the |
| 4 | * Aruba HiSpeed Cache Plugin for more information |
| 5 | * php version 5.6 |
| 6 | * |
| 7 | * @category Wordpress-plugin |
| 8 | * @package Aruba-HiSpeed-Cache |
| 9 | * @author Aruba Developer <hispeedcache.developer@aruba.it> |
| 10 | * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 |
| 11 | * @link https://developer.wordpress.org/plugins/plugin-basics/uninstall-methods/ |
| 12 | */ |
| 13 | |
| 14 | namespace ArubaSPA\HiSpeedCache; |
| 15 | |
| 16 | // If uninstall.php is not called by WordPress, die. |
| 17 | if ( ! \defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
| 18 | exit; |
| 19 | } |
| 20 | |
| 21 | \delete_site_option( 'aruba_hispeed_cache_options' ); |
| 22 | \delete_site_option( 'aruba_hispeed_cache_version'); |
| 23 | if ( ! is_multisite() ) { |
| 24 | |
| 25 | require_once( ABSPATH . 'wp-admin/includes/file.php' ); |
| 26 | $ahsc_htaccess = get_home_path() . '.htaccess'; |
| 27 | insert_with_markers( $ahsc_htaccess, 'AHSC_RULES', array(' ') ); |
| 28 | |
| 29 | $ahsc_file = WP_CONTENT_DIR . '/object-cache.php'; |
| 30 | if ( file_exists( $ahsc_file ) ) { |
| 31 | // phpcs:ignore |
| 32 | @unlink( $ahsc_file ); |
| 33 | } |
| 34 | } |