PluginProbe
WDesignKit – AI Templates, Widget Builder & MCP Workflow / 2.3.3
WDesignKit – AI Templates, Widget Builder & MCP Workflow v2.3.3
2.6.6 2.6.5 2.6.4 2.6.3 2.6.2 2.6.1 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 2.5.1 2.5.0 2.4.0 2.3.3 2.3.2 2.3.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 All 128 releases
wdesignkit / uninstall.php

uninstall.php in WDesignKit – AI Templates, Widget Builder & MCP Workflow 2.3.3, at uninstall.php

57 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Fired when the plugin is uninstalled.
5 *
6 * @link https://posimyth.com/
7 * @since 1.0.0
8 *
9 * @package Wdesignkit
10 */
11
12 // If uninstall not called from WordPress, then exit.
13 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
14 exit;
15 }
16
17 // Get the plugin setting and remove entries before unistall plugin.
18 $get_setting = get_option( 'wkit_settings_panel', false );
19
20 if ( ! empty( $get_setting['remove_db']['remove_entries'] ) && $get_setting['remove_db']['remove_entries'] == 'on' ) {
21
22 if ( ! empty( $get_setting['remove_db']['promotion_data'] ) && $get_setting['remove_db']['promotion_data'] == true ) {
23 $users = get_users();
24
25 if ( ! empty( $users ) ) {
26 foreach ( $users as $user ) {
27 $user_id = $user->ID;
28
29 delete_user_meta( $user_id, 'wdkit_rating_banner_start_date' );
30 }
31 }
32 }
33
34 if ( ! empty( $get_setting['remove_db']['widget_builder_data'] ) && $get_setting['remove_db']['widget_builder_data'] == true ) {
35 delete_option( 'wkit_deactivate_widgets' );
36 delete_option( 'wkit_builder' );
37 }
38
39 if ( ! empty( $get_setting['remove_db']['all_data'] ) && $get_setting['remove_db']['all_data'] == true ) {
40 delete_option( 'wkit_deactivate_widgets' );
41 delete_option( 'wkit_builder' );
42 delete_option( 'wkit_settings_panel' );
43 delete_option( 'wkit_onbording_end' );
44 delete_option( 'wdkit_dark_mode' );
45 delete_option( 'wdkit_wintersale_notice_dismissed' );
46
47 $users = get_users();
48 if ( ! empty( $users ) ) {
49 foreach ( $users as $user ) {
50 $user_id = $user->ID;
51
52 delete_user_meta( $user_id, 'wdkit_rating_banner_start_date' );
53 }
54 }
55 }
56 }
57