forked from analogwp/analogwp-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.php
31 lines (24 loc) · 837 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
<?php
/**
* Uninstall AnalogWP.
*
* @package AnalogWP
*/
// Exit if accessed directly.
defined( 'WP_UNINSTALL_PLUGIN' ) || exit;
$options = get_option( 'ang_options' );
if ( is_array( $options ) && isset( $options['remove_on_uninstall'] ) && true === $options['remove_on_uninstall'] ) {
delete_option( 'ang_options' );
delete_option( '_ang_import_history' );
delete_option( 'style_kits_previous_db_version' );
delete_option( 'style_kits_db_version' );
delete_option( 'analog_onboarding' );
delete_option( 'ran_onboarding' );
}
delete_option( '_ang_installed_time' );
delete_transient( 'ang_license_message' );
delete_transient( 'analogwp_template_info' );
wp_clear_scheduled_hook( 'analog/tracker/send_event' );
if ( class_exists( '\Elementor\Plugin' ) ) {
\Elementor\Plugin::$instance->files_manager->clear_cache();
}