wp-fastest-cache
Last commit date
css
5 years ago
images
6 years ago
inc
5 years ago
js
5 years ago
languages
6 years ago
templates
5 years ago
index.html
11 years ago
readme.txt
5 years ago
uninstall.php
5 years ago
wpFastestCache.php
5 years ago
uninstall.php
59 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Runs on Uninstall of WP Fastest Cache |
| 4 | * |
| 5 | * @package WP Fastest Cache |
| 6 | * @author Emre Vona |
| 7 | * @license GPL-2.0+ |
| 8 | * @link http://wordpress.org/plugins/wp-fastest-cache/ |
| 9 | */ |
| 10 | |
| 11 | // if uninstall.php is not called by WordPress, die |
| 12 | if(!defined('WP_UNINSTALL_PLUGIN')){ |
| 13 | die; |
| 14 | } |
| 15 | |
| 16 | include_once("wpFastestCache.php"); |
| 17 | |
| 18 | wpfastestcache_deactivate(); |
| 19 | |
| 20 | delete_option("WpFastestCache"); |
| 21 | delete_option("WpFcDeleteCacheLogs"); |
| 22 | delete_option("WpFastestCacheCDN"); |
| 23 | delete_option("WpFastestCacheExclude"); |
| 24 | delete_option("WpFastestCachePreLoad"); |
| 25 | delete_option("WpFastestCacheCSS"); |
| 26 | delete_option("WpFastestCacheCSSSIZE"); |
| 27 | delete_option("WpFastestCacheJS"); |
| 28 | delete_option("WpFastestCacheJSSIZE"); |
| 29 | delete_option("WpFastestCacheXML"); |
| 30 | delete_option("WpFastestCacheXMLSIZE"); |
| 31 | delete_option("WpFastestCacheSVG"); |
| 32 | delete_option("WpFastestCacheSVGSIZE"); |
| 33 | delete_option("WpFastestCacheJSON"); |
| 34 | delete_option("WpFastestCacheJSONSIZE"); |
| 35 | delete_option("WpFastestCacheWOFF"); |
| 36 | delete_option("WpFastestCacheWOFFSIZE"); |
| 37 | delete_option("WpFastestCacheToolbarSettings"); |
| 38 | delete_option("wpfc_server_location"); |
| 39 | delete_option("wpfc-group"); |
| 40 | delete_option("WpFc_credit"); |
| 41 | delete_option("WpFc_api_key"); |
| 42 | delete_transient("wpfc_premium_update_info"); |
| 43 | |
| 44 | foreach ((array)_get_cron_array() as $cron_key => $cron_value) { |
| 45 | foreach ( (array) $cron_value as $hook => $events ) { |
| 46 | if(preg_match("/^wp\_fastest\_cache/", $hook)){ |
| 47 | $args = array(); |
| 48 | |
| 49 | foreach ( (array) $events as $event_key => $event ) { |
| 50 | if(isset($event["args"]) && isset($event["args"][0])){ |
| 51 | $args = array(json_encode(json_decode($event["args"][0]))); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | wp_clear_scheduled_hook($hook, $args); |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | ?> |