<?php if (!defined('WP_UNINSTALL_PLUGIN')) { exit; } global $wpdb; require_once 'lib/uninstall.php'; if (!defined('RELEVANSSI_PREMIUM')) { relevanssi_uninstall(); } // if Relevanssi Premium is installed, options will not be deleted function relevanssi_uninstall() { delete_option('relevanssi_title_boost'); delete_option('relevanssi_tag_boost'); delete_option('relevanssi_comment_boost'); delete_option('relevanssi_admin_search'); delete_option('relevanssi_highlight'); delete_option('relevanssi_txt_col'); delete_option('relevanssi_bg_col'); delete_option('relevanssi_css'); delete_option('relevanssi_class'); delete_option('relevanssi_excerpts'); delete_option('relevanssi_excerpt_length'); delete_option('relevanssi_excerpt_type'); delete_option('relevanssi_excerpt_allowable_tags'); delete_option('relevanssi_log_queries'); delete_option('relevanssi_excat'); delete_option('relevanssi_cat'); delete_option('relevanssi_index_fields'); delete_option('relevanssi_exclude_posts');
function relevanssi_options() { $options_txt = __('Relevanssi Search Options', 'relevanssi'); printf("<div class='wrap'><h2>%s</h2>", $options_txt); if (isset($_REQUEST['submit'])) { update_relevanssi_options(); } if (isset($_REQUEST['index'])) { update_relevanssi_options(); relevanssi_build_index(); } if (isset($_REQUEST['index_extend'])) { update_relevanssi_options(); relevanssi_build_index(true); } if (isset($_REQUEST['search'])) { relevanssi_search($_REQUEST['q']); } if (isset($_REQUEST['uninstall'])) { relevanssi_uninstall(); } if (isset($_REQUEST['dowhat'])) { if ("add_stopword" == $_REQUEST['dowhat']) { if (isset($_REQUEST['term'])) { relevanssi_add_stopword($_REQUEST['term']); } } } if (isset($_REQUEST['addstopword'])) { relevanssi_add_stopword($_REQUEST['addstopword']); } if (isset($_REQUEST['removestopword'])) { relevanssi_remove_stopword($_REQUEST['removestopword']); } relevanssi_options_form(); relevanssi_common_words(); echo "<div style='clear:both'></div>"; echo "</div>"; }
function relevanssi_options() { $options_txt = __('Relevanssi Search Options', 'relevanssi'); printf("<div class='wrap'><?php screen_icon(); ?><h2>%s</h2>", $options_txt); if (!empty($_REQUEST)) { if (isset($_REQUEST['hidesponsor'])) { update_option('relevanssi_hidesponsor', 'true'); } if (isset($_REQUEST['submit'])) { update_relevanssi_options(); } if (isset($_REQUEST['index'])) { update_relevanssi_options(); relevanssi_build_index(); } if (isset($_REQUEST['index_extend'])) { update_relevanssi_options(); relevanssi_build_index(true); } if (isset($_REQUEST['search'])) { relevanssi_search($_REQUEST['q']); } if (isset($_REQUEST['uninstall'])) { relevanssi_uninstall(); } if (isset($_REQUEST['dowhat'])) { if ("add_stopword" == $_REQUEST['dowhat']) { if (isset($_REQUEST['term'])) { relevanssi_add_stopword($_REQUEST['term']); } } } if (isset($_REQUEST['addstopword'])) { relevanssi_add_stopword($_REQUEST['addstopword']); } if (isset($_REQUEST['removestopword'])) { relevanssi_remove_stopword($_REQUEST['removestopword']); } if (isset($_REQUEST['removeallstopwords'])) { relevanssi_remove_all_stopwords(); } if (isset($_REQUEST['truncate'])) { $clear_all = true; relevanssi_truncate_cache($clear_all); } } relevanssi_options_form(); relevanssi_common_words(); echo "<div style='clear:both'></div>"; echo "</div>"; }