PluginProbe
Hash Form – Drag & Drop Form Builder / trunk
Hash Form – Drag & Drop Form Builder vtrunk
1.4.4 1.4.3 1.4.2 1.4.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 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.2.5 1.2.6 1.2.6.1 1.2.7 1.2.8 1.2.9 1.3.0 All 47 releases
hash-form / uninstall.php

uninstall.php in Hash Form – Drag & Drop Form Builder trunk, at uninstall.php

37 lines 1.3 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 Hash Form is deleted from the Plugins screen.
5 *
6 * Only things the plugin added to WordPress itself are removed here. Forms,
7 * fields, entries and their uploaded files are deliberately left in place:
8 * deleting a plugin should not throw away submissions a site may still need,
9 * or be legally required to keep, and a plugin that quietly destroys data on
10 * uninstall is one nobody can safely reinstall to try again.
11 *
12 * @package Hash_Form
13 */
14 // If uninstall was not called by WordPress, then exit.
15 if (!defined('WP_UNINSTALL_PLUGIN')) {
16 exit;
17 }
18
19 require_once plugin_dir_path(__FILE__) . 'includes/HashFormCapabilities.php';
20
21 if (class_exists('HashFormCapabilities')) {
22 // Take the plugin's capabilities back off every role, so it does not
23 // leave them scattered across roles it once touched.
24 HashFormCapabilities::remove_caps();
25 }
26
27 delete_option('hashform_caps_version');
28
29 // A scheduled event outlives the plugin file unless it is cleared, and then
30 // fires forever against a hook nothing answers.
31 wp_clear_scheduled_hook('hashform_daily_maintenance');
32
33 // Migration bookkeeping, not data. The tables and everything in them stay.
34 delete_option('hashform_schema_version');
35 delete_option('hashform_schema_progress');
36 delete_transient('hashform_schema_lock');
37