PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 1.4.7
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v1.4.7
3.5.1 3.5.0 3.4.8 3.4.7 3.4.6 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.6.1 1.6.7 1.7.0 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.2 1.7.2.1 1.7.2.2 1.7.3 1.7.4 1.7.5 1.7.5.1 1.7.5.2 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.8.0 1.8.0.1 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.0.1 1.9.1 1.9.2 1.9.3 1.9.4 1.9.4.1 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.0.1 2.0.1 2.0.2 2.0.3 2.0.3.1 2.0.4 2.0.4.1 2.0.5 2.0.6 2.0.7 2.0.8 2.0.8.1 2.0.9 3.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.3.1 3.0.4 3.0.4.1 3.0.4.2 3.0.5 3.0.5.1 3.0.5.2 3.0.6 3.0.6.1 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.0.9.1 3.0.9.2 3.0.9.3 3.0.9.4 3.0.9.5 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.2.1 3.4.3 3.4.4 3.4.5 trunk 1.0 1.0.1 1.0.2 1.0.3
everest-forms / uninstall.php
everest-forms Last commit date
assets 7 years ago includes 7 years ago languages 7 years ago templates 7 years ago trunk 7 years ago .babelrc 7 years ago .browserslistrc 7 years ago .eslintignore 7 years ago .eslintrc 7 years ago .stylelintrc.json 7 years ago everest-forms.php 7 years ago license.txt 8 years ago package-lock.json 7 years ago phpcs.xml 7 years ago readme.txt 7 years ago renovate.json 7 years ago uninstall.php 7 years ago webpack.config.js 7 years ago
uninstall.php
47 lines
1 <?php
2 /**
3 * EverestForms Uninstall
4 *
5 * Uninstalls the plugin deletes user roles, tables, and options.
6 *
7 * @package EverestForms\Uninstaller
8 * @version 1.0.0
9 */
10
11 defined( 'WP_UNINSTALL_PLUGIN' ) || exit;
12
13 global $wpdb;
14
15 wp_clear_scheduled_hook( 'everest_forms_cleanup_sessions' );
16
17 /*
18 * Only remove ALL data if EVF_REMOVE_ALL_DATA constant is set to true in user's
19 * wp-config.php. This is to prevent data loss when deleting the plugin from the backend
20 * and to ensure only the site owner can perform this action.
21 */
22 if ( defined( 'EVF_REMOVE_ALL_DATA' ) && true === EVF_REMOVE_ALL_DATA ) {
23 include_once( dirname( __FILE__ ) . '/includes/class-evf-install.php' );
24
25 // Roles + caps.
26 EVF_Install::remove_roles();
27
28 // Tables.
29 EVF_Install::drop_tables();
30
31 // Pages.
32 wp_trash_post( get_option( 'everest_forms_default_form_page_id' ) );
33
34 // Delete options.
35 $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'evf\_%';" );
36
37 // Delete usermeta.
38 $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key LIKE 'evf\_%';" );
39
40 // Delete posts + data.
41 $wpdb->query( "DELETE FROM {$wpdb->posts} WHERE post_type IN ( 'everest_form' );" );
42 $wpdb->query( "DELETE meta FROM {$wpdb->postmeta} meta LEFT JOIN {$wpdb->posts} posts ON posts.ID = meta.post_id WHERE posts.ID IS NULL;" );
43
44 // Clear any cached data that has been removed.
45 wp_cache_flush();
46 }
47