-
Notifications
You must be signed in to change notification settings - Fork 2
/
uninstall.php
39 lines (33 loc) · 877 Bytes
/
uninstall.php
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
31
32
33
34
35
36
37
38
39
<?php
/**
* The Purge Cache for CloudFlare Plugin
*
* Code used when the plugin is deleted.
*
* @package Purge_Cache_for_CloudFlare
* @subpackage Unistall
*/
/* Exit if accessed directly or not in unistall */
if ( ! defined( 'ABSPATH' ) || ! defined( 'WP_UNINSTALL_PLUGIN' ) ) exit;
// Load dependencies
require __DIR__ . '/vendor/autoload.php';
/*
* Remove options on uninstallation of plugin.
*
* @since 1.0
*/
delete_option( 'purge_cache_for_cloudflare_api_key' );
delete_option( 'purge_cache_for_cloudflare_api_email_address' );
delete_option( 'purge_cache_for_cloudflare_urls' );
/*
* Clean expired temporaries on uninstallation of plugin.
*
* @since 1.0
*/
WP_Temporary::clean();
/*
* Delete temporaries on uninstallation of plugin.
*
* @since 1.0
*/
WP_Temporary::delete( 'purge_cache_for_cloudflare_requests_limit' );