| Server IP : 216.106.184.20 / Your IP : 216.73.216.234 Web Server : LiteSpeed System : Linux asmodeus.in-hell.com 5.14.0-570.58.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 29 06:24:11 EDT 2025 x86_64 User : sekoaid1 ( 1891) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sekoaid1/www/wp-content/plugins/ai-engine/ |
Upload File : |
<?php
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
die;
}
function mwai_remove_crons() {
$timestamp = wp_next_scheduled( 'mwai_files_cleanup' );
wp_unschedule_event( $timestamp, 'mwai_files_cleanup' );
}
function mwai_remove_database() {
global $wpdb;
$table_name1 = $wpdb->prefix . "mwai_chats";
$table_name2 = $wpdb->prefix . "mwai_logmeta";
$table_name3 = $wpdb->prefix . "mwai_logs";
$table_name4 = $wpdb->prefix . "mwai_vectors";
$sql = "DROP TABLE IF EXISTS $table_name1, $table_name2, $table_name3, $table_name4";
$wpdb->query( $sql );
}
function mwai_remove_options() {
global $wpdb;
$options = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE 'mwai_%'" );
foreach( $options as $option ) {
delete_option( $option->option_name );
}
}
function mwai_uninstall () {
$options = get_option( 'mwai_options', [] );
$cleanUninstall = $options['clean_uninstall'];
if ( $cleanUninstall ) {
mwai_remove_options();
mwai_remove_database();
}
}
mwai_uninstall();