Restore to commit 74e578279624c6045ca440a3459ebfa1f8d54191
This commit is contained in:
36
chat/templates/Form Builder/uninstall.php
Normal file
36
chat/templates/Form Builder/uninstall.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PC Form Builder Uninstall
|
||||
*
|
||||
* Cleans up plugin data when uninstalled.
|
||||
*
|
||||
* @package PCFormBuilder
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'delete_plugins' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
delete_option( 'pcfb_version' );
|
||||
delete_option( 'pcfb_activated' );
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$tables = array(
|
||||
$wpdb->prefix . 'pcfb_forms',
|
||||
$wpdb->prefix . 'pcfb_fields',
|
||||
$wpdb->prefix . 'pcfb_responses',
|
||||
$wpdb->prefix . 'pcfb_response_data',
|
||||
);
|
||||
|
||||
foreach ( $tables as $table ) {
|
||||
$wpdb->query( "DROP TABLE IF EXISTS {$table}" );
|
||||
}
|
||||
Reference in New Issue
Block a user