Esempio n. 1
0
/**
 * display popular search terms manually 
 * @param $count: number of search terms to be displayed
 * */
function stt_popular_terms($count = 10)
{
    $options = get_option('pk_stt2_settings');
    $searchterms = pk_stt2_db_get_popular_terms($count);
    if (!empty($searchterms)) {
        $result = pk_stt2_function_prepare_searchterms($searchterms, $options, true);
        return $result;
    } else {
        return false;
    }
}
Esempio n. 2
0
/**
 * display popular search terms via widget
 * */
function stt_popular_terms_widget($options)
{
    $searchterms = pk_stt2_db_get_popular_terms($options['limit']);
    if (!empty($searchterms)) {
        $result = pk_stt2_function_prepare_searchterms_widget($searchterms, $options['list'], $options['search']);
        return $result;
    } else {
        return false;
    }
}