File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 24
24
require_once __DIR__ . '/src/autoload.php ' ;
25
25
26
26
register_activation_hook ( __FILE__ , 'aaa_option_optimizer_activation ' );
27
+ register_deactivation_hook ( __FILE__ , 'aaa_option_optimizer_deactivation ' );
27
28
28
29
/**
29
30
* Activation hooked function to store start stats.
@@ -53,6 +54,16 @@ function aaa_option_optimizer_activation() {
53
54
);
54
55
}
55
56
57
+ /**
58
+ * Deactivation hooked function to remove autoload from the plugin option.
59
+ *
60
+ * @return void
61
+ */
62
+ function aaa_option_optimizer_deactivation () {
63
+ $ aaa_option_value = get_option ( 'option_optimizer ' );
64
+ update_option ( 'option_optimizer ' , $ aaa_option_value , false );
65
+ }
66
+
56
67
/**
57
68
* Initializes the plugin.
58
69
*
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Uninstall the plugin.
4
+ *
5
+ * Delete the plugin option.
6
+ *
7
+ * @package Progress_Planner
8
+ */
9
+
10
+ // If uninstall not called from WordPress, then exit.
11
+ if ( ! defined ( 'WP_UNINSTALL_PLUGIN ' ) ) {
12
+ exit ;
13
+ }
14
+
15
+ // Delete the plugin option.
16
+ delete_option ( 'option_optimizer ' );
You can’t perform that action at this time.
0 commit comments