PluginProbe ʕ •ᴥ•ʔ
All-in-One WP Migration and Backup / trunk
All-in-One WP Migration and Backup vtrunk
trunk 7.100 7.101 7.102 7.103 7.104 7.105 7.97 7.98 7.99
all-in-one-wp-migration / uninstall.php
all-in-one-wp-migration Last commit date
lib 1 month ago LICENSE 12 years ago all-in-one-wp-migration.php 1 month ago changelog.txt 2 years ago constants.php 1 month ago deprecated.php 1 year ago exceptions.php 2 months ago functions.php 2 months ago loader.php 2 months ago readme.txt 1 month ago uninstall.php 11 months ago
uninstall.php
52 lines
1 <?php
2 /**
3 * Copyright (C) 2014-2025 ServMask Inc.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * Attribution: This code is part of the All-in-One WP Migration plugin, developed by
19 *
20 * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
21 * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
22 * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
23 * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
24 * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
25 * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
26 */
27
28 if ( ! defined( 'ABSPATH' ) ) {
29 die( 'Kangaroos cannot jump here' );
30 }
31
32 // Trigger Uninstall process only if WP_UNINSTALL_PLUGIN is defined
33 if ( defined( 'WP_UNINSTALL_PLUGIN' ) ) {
34 global $wpdb;
35
36 // Reset cron schedules
37 if ( ( $cron = get_option( 'cron', array() ) ) ) {
38 foreach ( $cron as $timestamp => $hooks ) {
39 foreach ( $hooks as $key => $value ) {
40 if ( strpos( $key, 'ai1wm_' ) === 0 ) {
41 unset( $cron[ $timestamp ][ $key ] );
42 }
43 }
44 }
45
46 update_option( 'cron', $cron );
47 }
48
49 // Delete any options or other data stored in the database here
50 $wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE 'ai1wm\_%'" );
51 }
52