PluginProbe
Code Engine – PHP Snippets, AI Functions & Automation for WordPress / 0.5.1
Code Engine – PHP Snippets, AI Functions & Automation for WordPress v0.5.1
0.5.6 0.5.5 0.5.4 0.5.3 0.5.2 0.5.1 0.5.0 0.4.9 0.4.8 0.4.7 0.4.6 trunk 0.0.1 0.0.2 0.2.8 0.2.9 0.3.0 0.3.1 0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 0.3.8 All 32 releases
code-engine / uninstall.php

uninstall.php in Code Engine – PHP Snippets, AI Functions & Automation for WordPress 0.5.1, at uninstall.php

38 lines 806 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
3 die;
4 }
5
6 function mwcode_remove_database() {
7 global $wpdb;
8 $table_name1 = $wpdb->prefix . "mwcode_snippets";
9 $sql = "DROP TABLE IF EXISTS $table_name1";
10 $wpdb->query( $sql );
11
12
13 }
14
15 function mwcode_remove_options() {
16
17 // Delete the options
18 $option_functions = 'mwcode_functions';
19 $option_intervals = 'mwcode_intervals';
20 $options = 'mwcode_options';
21
22 delete_option( $options );
23 delete_option( $option_functions );
24 delete_option( $option_intervals );
25 }
26
27 function mwcode_uninstall () {
28 $options = get_option( 'mwcode_options' );
29 $cleanUninstall = array_key_exists( 'clean_uninstall', $options ) ? $options['clean_uninstall'] : false;
30
31 if ( $cleanUninstall ) {
32 mwcode_remove_options();
33 mwcode_remove_database();
34 }
35
36 }
37
38 mwcode_uninstall();