PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.0.9
JetFormBuilder — Dynamic Blocks Form Builder v3.0.9
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / uninstall.php
jetformbuilder Last commit date
assets 2 years ago framework 2 years ago includes 2 years ago languages 2 years ago templates 2 years ago README.md 2 years ago composer.json 2 years ago index.php 2 years ago jet-form-builder.php 2 years ago readme.txt 2 years ago uninstall.php 2 years ago wp-cli.local.yml 2 years ago
uninstall.php
102 lines
1 <?php
2 /**
3 * @since 3.0.0
4 */
5 // phpcs:disable WordPress.DB.DirectDatabaseQuery
6
7 // if uninstall.php is not called by WordPress, die
8 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
9 die;
10 }
11
12 $options = get_option( 'jet_form_builder_settings__options-tab' );
13
14 if ( ! $options ) {
15 return;
16 }
17
18 $options = json_decode( $options, true );
19
20 if ( empty( $options['clear_on_uninstall'] ) ) {
21 return;
22 }
23
24 $opt_prefixes = array(
25 'jet\_form\_builder\_settings\_\_',
26 'jet\_fb\_',
27 'jfb\-',
28 'jfb\_'
29 );
30 $additional_prefixes = array();
31
32 foreach ( $opt_prefixes as $prefix ) {
33 array_push(
34 $additional_prefixes,
35 '\_transient\_' . $prefix,
36 '\_site\_transient\_' . $prefix,
37 '\_transient\_timeout\_' . $prefix,
38 '\_site\_transient\_timeout\_' . $prefix
39 );
40 }
41
42 $opt_prefixes = array_merge( $opt_prefixes, $additional_prefixes );
43
44 $options_condition = "option_name LIKE '" . implode( "%' OR option_name LIKE '", $opt_prefixes ) . "%'";
45
46 $tables = array(
47 // secondary tables
48 'records_actions',
49 'records_errors',
50 'records_fields',
51 'subscription_to_payer_shipping',
52 'subscriptions_to_records',
53 'subscriptions_to_payments',
54 'subscriptions_notes',
55 'payment_to_payer_shipping',
56 'payments_to_records',
57 'payers_shipping',
58 // primary tables
59 'csrf_tokens',
60 'recurring_cycles',
61 'subscriptions',
62 'payments',
63 'migrations',
64 'payers',
65 'records',
66 );
67
68 /**
69 * @var wpdb $wpdb
70 */
71 global $wpdb;
72
73 foreach ( $tables as $table_name ) {
74 $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'jet_fb_' . $table_name );
75 }
76
77 $wpdb->query( "DELETE FROM {$wpdb->options} WHERE {$options_condition}" );
78
79 $forms = get_posts(
80 [
81 'post_type' => [ 'jet-form-builder' ],
82 'post_status' => 'any',
83 'numberposts' => - 1,
84 'fields' => 'ids',
85 ]
86 );
87 if ( $forms ) {
88 foreach ( $forms as $form_id ) {
89 wp_delete_post( $form_id, true );
90 }
91 }
92
93 /**
94 * @var WP_Filesystem_Base $wp_filesystem
95 */
96 global $wp_filesystem;
97
98 $uploads_directory = wp_upload_dir();
99 if ( empty( $uploads_directory['error'] ) ) {
100 $wp_filesystem->rmdir( $uploads_directory['basedir'] . '/jet-form-builder/', true );
101 }
102