PluginProbe
Chartify – WordPress Chart Plugin / 3.6.0
Chartify – WordPress Chart Plugin v3.6.0
3.8.0 3.7.9 3.7.8 3.7.7 3.7.6 3.7.5 trunk 1.0.0 3.0.0 3.0.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.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 All 83 releases
chart-builder / uninstall.php

uninstall.php in Chartify – WordPress Chart Plugin 3.6.0, at uninstall.php

44 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Fired when the plugin is uninstalled.
5 *
6 * When populating this file, consider the following flow
7 * of control:
8 *
9 * - This method should be static
10 * - Check if the $_REQUEST content actually is the plugin name
11 * - Run an admin referrer check to make sure it goes through authentication
12 * - Verify the output of $_GET makes sense
13 * - Repeat with other user roles. Best directly by using the links/query string parameters.
14 * - Repeat things for multisite. Once for a single site in the network, once sitewide.
15 *
16 * This file may be updated more in future version of the Boilerplate; however, this is the
17 * general skeleton and outline for how the file should work.
18 *
19 * For more information, see the following discussion:
20 * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913
21 *
22 * @link https://ays-pro.com/
23 * @since 1.0.0
24 *
25 * @package Chart_Builder
26 */
27
28 // If uninstall not called from WordPress, then exit.
29 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
30 exit;
31 }
32 if(get_option('ays_chart_builder_upgrade_plugin','false') === 'false'){
33 global $wpdb;
34
35 $charts_table = $wpdb->prefix . 'ayschart_charts';
36 $charts_meta_table = $wpdb->prefix . 'ayschart_charts_meta';
37 $settings_table = $wpdb->prefix . 'ayschart_settings';
38 $wpdb->query("DROP TABLE IF EXISTS `".$charts_table."`");
39 $wpdb->query("DROP TABLE IF EXISTS `".$charts_meta_table."`");
40 $wpdb->query("DROP TABLE IF EXISTS `".$settings_table."`");
41
42 delete_option( "ays_chart_db_version");
43 delete_option( "ays_chart_builder_upgrade_plugin");
44 }