mirror of
https://ghproxy.net/https://github.com/elementor/wp2static.git
synced 2025-08-29 05:51:53 +08:00
26 lines
501 B
PHP
26 lines
501 B
PHP
<?php
|
|
|
|
// exit uninstall if not called by WP
|
|
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
|
exit();
|
|
}
|
|
|
|
global $wpdb;
|
|
|
|
$tables_to_drop = [
|
|
'wp2static_core_options',
|
|
'wp2static_crawl_cache',
|
|
'wp2static_deploy_cache',
|
|
'wp2static_jobs',
|
|
'wp2static_log',
|
|
'wp2static_urls',
|
|
];
|
|
|
|
foreach ( $tables_to_drop as $table ) {
|
|
$table_name = $wpdb->prefix . $table;
|
|
|
|
$wpdb->query( "DROP TABLE IF EXISTS $table_name" );
|
|
}
|
|
|
|
// TODO: delete crawl_cache, processed_site and zip if exist
|
|
|