. * * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ */ if ( ! defined( 'ABSPATH' ) ) { die( 'Kangaroos cannot jump here' ); } class Ai1wm_Import_Clean { public static function execute( $params ) { global $wpdb; // Get database client if ( empty( $wpdb->use_mysqli ) ) { $mysql = new Ai1wm_Database_Mysql( $wpdb ); } else { $mysql = new Ai1wm_Database_Mysqli( $wpdb ); } // Flush mainsite tables $mysql->add_table_prefix_filter( ai1wm_table_prefix( 'mainsite' ) ); $mysql->flush(); // Delete storage files Ai1wm_Directory::delete( ai1wm_storage_path( $params ) ); // Exit in console if ( defined( 'WP_CLI' ) ) { return $params; } exit; } }