From cb68442c31e0af336490738702acc766035f671f Mon Sep 17 00:00:00 2001 From: Devin Price Date: Sun, 15 May 2011 18:43:13 -0500 Subject: [PATCH] Remove deactivation hooks since they don't work in themes. --- admin/options-framework.php | 26 -------------------------- functions.php | 6 +++++- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/admin/options-framework.php b/admin/options-framework.php index 7dff1c4..a9117dc 100755 --- a/admin/options-framework.php +++ b/admin/options-framework.php @@ -49,32 +49,6 @@ function optionsframework_rolescheck () { } } -/* Register plugin activation hooks */ - -register_activation_hook(__FILE__,'optionsframework_activation_hook'); - -function optionsframework_activation_hook() { - register_uninstall_hook( __FILE__, 'optionsframework_delete_options' ); -} - -/* When uninstalled, deletes options */ - -register_uninstall_hook( __FILE__, 'optionsframework_delete_options' ); - -function optionsframework_delete_options() { - - $optionsframework_settings = get_option('optionsframework'); - - // Each theme saves its data in a seperate option, which all gets deleted - $knownoptions = $optionsframework_settings['knownoptions']; - if ($knownoptions) { - foreach ($knownoptions as $key) { - delete_option($key); - } - } - delete_option('optionsframework'); -} - /* * Creates the settings in the database by looping through the array * we supplied in options.php. This is a neat way to do it since diff --git a/functions.php b/functions.php index 597e95b..e475816 100755 --- a/functions.php +++ b/functions.php @@ -1,5 +1,7 @@