forked from netconstructor/Visual-Form-Builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.php
More file actions
20 lines (15 loc) · 792 Bytes
/
Copy pathuninstall.php
File metadata and controls
20 lines (15 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
exit();
global $wpdb;
$form_table = $wpdb->prefix . 'visual_form_builder_fields';
$fields_table = $wpdb->prefix . 'visual_form_builder_forms';
$entries_table = $wpdb->prefix . 'visual_form_builder_entries';
$wpdb->query( "DROP TABLE IF EXISTS $form_table" );
$wpdb->query( "DROP TABLE IF EXISTS $fields_table" );
$wpdb->query( "DROP TABLE IF EXISTS $entries_table" );
delete_option( 'vfb_db_version' );
delete_option( 'visual-form-builder-screen-options' );
delete_option( 'vfb_dashboard_widget_options' );
$wpdb->query( "DELETE FROM " . $wpdb->prefix . "usermeta WHERE meta_key IN ( 'vfb-form-settings', 'vfb_entries_per_page', 'vfb_forms_per_page', 'managevisual-form-builder_page_vfb-entriescolumnshidden' )" );
?>