PluginProbe
WDesignKit – AI Templates, Widget Builder & MCP Workflow for WordPress / 2.2
WDesignKit – AI Templates, Widget Builder & MCP Workflow for WordPress v2.2
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 1.0.18 All 127 releases
wdesignkit / uninstall.php

uninstall.php in WDesignKit – AI Templates, Widget Builder & MCP Workflow for WordPress 2.2, at uninstall.php

56 lines 1.5 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
46 $users = get_users();
47 if ( ! empty( $users ) ) {
48 foreach ( $users as $user ) {
49 $user_id = $user->ID;
50
51 delete_user_meta( $user_id, 'wdkit_rating_banner_start_date' );
52 }
53 }
54 }
55 }
56