public static function uninstall() { WpsOption::deleteOption(WpsSettings::LIVE_TRAFFIC_ENTRIES); WpsOption::deleteOption('WPS_KEEP_NUM_ENTRIES_LT'); WpsOption::deleteOption('WPS_REFRESH_RATE_AJAX_LT'); WpsOption::deleteOption(WpsSettings::PLUGIN_SETTINGS_OPTION_NAME); global $wpdb; $wpdb->query("DROP TABLE IF EXISTS " . WsdPlugin::getTableName(WpsSettings::SCAN_TABLE_NAME)); $wpdb->query("DROP TABLE IF EXISTS " . WsdPlugin::getTableName(WpsSettings::SCANS_TABLE_NAME)); $wpdb->query("DROP TABLE IF EXISTS " . WsdPlugin::getTableName(WpsSettings::ALERTS_TABLE_NAME)); $wpdb->query("DROP TABLE IF EXISTS " . WsdPlugin::getTableName(WpsSettings::LIVE_TRAFFIC_TABLE_NAME)); }
public static function deleteSettings() { WpsOption::deleteOption(WpsSettings::WP_FILE_SCAN_OPTION_NAME); wssLog('Settings deleted.'); }
// live traffic $liveTrafficEnabled = isset($_POST['chk_lt_display']) ? intval($_POST['chk_lt_display']) : 0; if (empty($liveTrafficEnabled)) { // hide $enableLiveTraffic = false; WpsOption::updateOption(WpsSettings::ENABLE_LIVE_TRAFFIC, false); } else { // show $enableLiveTraffic = true; WpsOption::updateOption(WpsSettings::ENABLE_LIVE_TRAFFIC, true); wssLog("Live traffic tool enabled."); } WpsOption::updateOption(WpsSettings::PLUGIN_SETTINGS_OPTION_NAME, $settings); $settings = WpsOption::getOption(WpsSettings::PLUGIN_SETTINGS_OPTION_NAME); } elseif (isset($_POST['deleteRssDataButton'])) { WpsOption::deleteOption(WpsSettings::FEED_DATA_OPTION_NAME); } } ?> <div class="wrap wsdplugin_content"> <h2><?php echo WPS_PLUGIN_NAME . ' - ' . __('Settings', WpsSettings::TEXT_DOMAIN); ?> </h2> <p class="clear"></p> <div style="clear: both; display: block;"> <div class="metabox-holder"> <div class="inner-sidebar1 postbox"> <h3 class="hndle" style="cursor: default;"><span><?php echo __('Settings', WpsSettings::TEXT_DOMAIN);