?> </p> <?php } ?> <p><?php echo osc_highlight(strip_tags(osc_item_description())); ?> </p> </div> </div> <?php } ?> <?php if (osc_count_latest_items() == osc_max_latest_items()) { ?> <div class="row show-all-ads"> <div class="span12 columns"> <a class="btn primary" href="<?php echo osc_search_show_all_url(); ?> "><strong><?php _e("See all offers", 'twitter_bootstrap'); ?> »</strong></a> </div> </div> <?php } ?>
/** * Gets number of latest items * * @return int */ function osc_count_latest_items($total_latest_items = null, $category = array()) { if (!View::newInstance()->_exists('latestItems')) { $search = Search::newInstance(); if (!is_numeric($total_latest_items)) { $total_latest_items = osc_max_latest_items(); } View::newInstance()->_exportVariableToView('latestItems', $search->getLatestItems($total_latest_items, $category)); } return (int) View::newInstance()->_count('latestItems'); }
/** * Gets number of latest items * * @return int */ function osc_count_latest_items($total_latest_items = null, $options = array()) { if (!View::newInstance()->_exists('latestItems')) { $search = Search::newInstance(); if (!is_numeric($total_latest_items)) { $total_latest_items = osc_max_latest_items(); } if (is_array($options) && empty($options)) { $options = osc_get_subdomain_params(); } else { if ($options == null) { $options = array(); } } View::newInstance()->_exportVariableToView('latestItems', $search->getLatestItems($total_latest_items, $options)); } return (int) View::newInstance()->_count('latestItems'); }
function osc_count_latest_items() { if (!View::newInstance()->_exists('items')) { View::newInstance()->_exportVariableToView('items', Item::newInstance()->listLatest(osc_max_latest_items())); } return osc_priv_count_items(); }
/** * Gets number of latest items * * @return int */ function osc_count_latest_items() { if (!View::newInstance()->_exists('items')) { $search = new Search(); $search->limit(0, osc_max_latest_items()); View::newInstance()->_exportVariableToView('items', $search->getLatestItems()); } return osc_priv_count_items(); }