Ejemplo n.º 1
0
/**
* get popular search terms on coresponding category
* @param $count: number of search terms to be displayed
**/
function stt_popular_terms_in_category($count = 10)
{
    if (is_category()) {
        $options = get_option('pk_stt2_settings');
        $searchterms = pk_stt2_db_get_popular_searchterms_in_category($count);
        if (!empty($searchterms)) {
            $result = pk_stt2_function_prepare_searchterms($searchterms, $options, true);
            return $result;
        } else {
            return false;
        }
    }
}
Ejemplo n.º 2
0
/**
* get popular search terms on coresponding category via widget
**/
function stt_popular_terms_in_category_widget($options)
{
    if (is_category()) {
        $searchterms = pk_stt2_db_get_popular_searchterms_in_category($options['limit']);
        if (!empty($searchterms)) {
            $result = pk_stt2_function_prepare_searchterms_widget($searchterms, $options['list'], $options['search']);
            return $result;
        } else {
            return false;
        }
    }
}