You are here

function simpleads_preprocess_simpleads_block in SimpleAds 7

Preprocess for simpleads_block.tpl.php

1 string reference to 'simpleads_preprocess_simpleads_block'
simpleads_theme in includes/simpleads.theme.inc
Implements hook_theme().

File

includes/simpleads.theme.inc, line 61
SimpleAds Theme.

Code

function simpleads_preprocess_simpleads_block(&$vars) {
  global $user;
  $ads = array();
  $vars = _simpleads_theme_attributes_init($vars);
  $tid = $vars['tid'];
  $limit = $vars['ads_limit'];
  if (is_numeric($tid)) {
    $ads = _simpleads_load_ads($tid, $limit);
  }
  $vars['ads'] = $ads;
  $vars['user_id'] = $user->uid;
}