Permalink
Browse files

implemented uninstall.php

  • Loading branch information...
1 parent 824667b commit 6bd3ad19caef5de5a74341d8a5d8d582e9a2721f @petenelson committed Sep 7, 2014
Showing with 14 additions and 18 deletions.
  1. +0 −15 class-WPAnyIpsumSettings.php
  2. +1 −1 index.php
  3. +13 −0 uninstall.php
  4. +0 −2 wp-anyipsum.php
@@ -51,21 +51,6 @@ public function deactivation_hook() {
}
- public function uninstall_hook() {
-
- $keys = array(
- $this->settings_key_general,
- $this->settings_key_filler,
- $this->settings_key_api,
- );
-
- // cleanup any options
- foreach ($keys as $key)
- delete_option( $key );
-
- }
-
-
function admin_init() {
$this->register_general_settings();
$this->register_filler_settings();
View
@@ -1,2 +1,2 @@
<?php
-// Bacon is golden
+// Bacon is delicious.
View
@@ -0,0 +1,13 @@
+<?php
+if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
+ exit();
+
+$keys = array(
+ 'anyipsum-settings-general',
+ 'anyipsum-settings-custom-filler',
+ 'anyipsum-settings-api',
+);
+
+// remove options
+foreach ($keys as $key)
+ delete_option( $key );
View
@@ -28,8 +28,6 @@
add_action( 'plugins_loaded', array($WPAnyIpsumSettings, 'plugins_loaded') );
register_activation_hook( __FILE__, array($WPAnyIpsumSettings, 'activation_hook') );
- register_deactivation_hook( __FILE__, array($WPAnyIpsumSettings, 'deactivation_hook') );
- register_uninstall_hook( __FILE__, array($WPAnyIpsumSettings, 'uninstall_hook') );
}

0 comments on commit 6bd3ad1

Please sign in to comment.