/** * display recent search terms manually * @param $count: number of search terms to be displayed * */ function stt_recent_terms($count = 10) { $options = get_option('pk_stt2_settings'); $searchterms = pk_stt2_db_get_recent_terms($count); if (!empty($searchterms)) { $result = pk_stt2_function_prepare_searchterms($searchterms, $options, true); return $result; } else { return false; } }
/** * display recent search terms via widget * */ function stt_recent_terms_widget($options) { global $wpdb; $searchterms = pk_stt2_db_get_recent_terms($options['limit']); if (!empty($searchterms)) { $result = pk_stt2_function_prepare_searchterms_widget($searchterms, $options['list'], $options['search']); return $result; } else { return false; } }