-
Notifications
You must be signed in to change notification settings - Fork 27
/
uninstall.php
31 lines (28 loc) · 1.06 KB
/
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
<?php
/**
* Plugin clean up.
*
* @package SlackNotifications
* @subpackage Plugin
* @author Dor Zuberi <[email protected]>
* @link https://www.dorzki.co.il
* @since 2.0.0
* @version 2.0.6
*/
// Block direct access to the file via url.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
// Clean plugin database data.
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'version' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'webhook' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'default_channel' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'bot_name' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'bot_image' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'text_integration' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'notifications' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'wordpress_version' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'plugins_version' );
delete_option( SLACK_NOTIFICATIONS_FIELD_PREFIX . 'themes_version' );
// Clean WordPress cache.
wp_cache_flush();