1, "ue_wp-forecast-timeout" => 1, "ue_wp-forecast-pre-transport" => 1, "ue_wp-forecast-delopt" => 1, "ue_service" => 1, "ue_apikey1" => 1, "ue_location" => 1, "ue_locname" => 1, "ue_refresh" => 1, "ue_metric" => 1, "ue_currtime" => 1, "ue_timeoffset" => 1, "ue_windunit" => 1, "ue_wpf_language" => 1, "ue_pdforecast" => 1, "ue_pdfirstday" => 1, "ue_dispconfig" => 1, "ue_forecast" => 1, "ue_daytime" => 1, "ue_nighttime" => 1 ); if (!$wpf_sa_defaults) { $wpf_sa_defaults = serialize(array()); add_blog_option(1,"wpf_sa_defaults",$wpf_sa_defaults); } if (!$wpf_sa_allowed) { $wpf_sa_allowed = serialize($allallowed); add_blog_option(1,"wpf_sa_allowed",$wpf_sa_allowed); } } pdebug(1,"End of wp_forecast_activate ()"); } // // is called when plugin is deactivated and removes all // the wp-forecast options from the database // function wp_forecast_deactivate($wpfcid) { pdebug(1,"Start of wp_forecast_deactivate ()"); global $wpf_maxwidgets; $delopt=get_option('wp-forecast-delopt'); // only delete options when switch is set if ($delopt == 1) { $count = $wpf_maxwidgets; //get_option('wp-forecast-count'); for ($i=0;$i<$count;$i++) { $wpfcid = get_widget_id( $i ); delete_option("wp-forecast-opts".$wpfcid); delete_option("wp-forecast-cache".$wpfcid); delete_option("wp-forecast-expire".$wpfcid); } delete_option('wp-forecast-timeout'); delete_option('wp-forecast-count'); delete_option('wp-forecast-delopt'); delete_option("wp-forecast-pre-transport"); delete_option("wp-forecast-wp-transport"); // delete options for superadmin on multisites delete_option("wpf_sa_defaults"); delete_option("wpf_sa_allowed"); } pdebug(1,"End of wp_forecast_deactivate ()"); } ?>