type; if (function_exists($function)) { $function($variables, $hook); } } function openstack_preprocess_node_event(&$variables, $hook) { if ($variables['teaser']) { $variables['theme_hook_suggestions'][] = 'node__' . $variables['node']->type . '__teaser'; $variables['display_submitted'] = False; $variables['user_picture'] = ''; $variables['content']['links'] = ''; // unset($variables['submitted']); // $variables['submitted'] = 'XXX'; } // echo "
";print_r($variables['display_submitted']);
//     die('-y-');
}

/**
 * Preprocess group node, remove 'read more' and 'comment login' links
 * from teaser.
 */
function openstack_preprocess_node_group(&$variables, $hook) {
  if ($variables['view_mode'] == 'teaser') {
    unset($variables['content']['links']['node']['#links']['node-readmore']);
    unset($variables['content']['links']['comment']['#links']['comment_forbidden']);
  }
}

function openstack_preprocess_views_view(&$variables) {
  $view = $variables['view'];
  if ($view->name == 'commons_events_upcoming') {
    $view->display_handler->set_option('filters', array());
    $view->display[$view->current_display]->handler->options["title"] = t('Upcoming events');
//     $filters = $view->display_handler->get_option('filters');
//      echo "
";print_r($filters);
//      die('-x-');
  }
}

/**
 * Override or insert variables into the comment templates.
 *
 * @param $variables
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("comment" in this case.)
 */
/* -- Delete this line if you want to use this function
function STARTERKIT_preprocess_comment(&$variables, $hook) {
  $variables['sample_variable'] = t('Lorem ipsum.');
}
// */

/**
 * Override or insert variables into the region templates.
 *
 * @param $variables
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("region" in this case.)
 */
/* -- Delete this line if you want to use this function
function STARTERKIT_preprocess_region(&$variables, $hook) {
  // Don't use Zen's region--sidebar.tpl.php template for sidebars.
  //if (strpos($variables['region'], 'sidebar_') === 0) {
  //  $variables['theme_hook_suggestions'] = array_diff($variables['theme_hook_suggestions'], array('region__sidebar'));
  //}
}
// */

/**
 * Override or insert variables into the block templates.
 *
 * @param $variables
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("block" in this case.)
 */
/* -- Delete this line if you want to use this function
function STARTERKIT_preprocess_block(&$variables, $hook) {
  // Add a count to all the blocks in the region.
  // $variables['classes_array'][] = 'count-' . $variables['block_id'];

  // By default, Zen will use the block--no-wrapper.tpl.php for the main
  // content. This optional bit of code undoes that:
  //if ($variables['block_html_id'] == 'block-system-main') {
  //  $variables['theme_hook_suggestions'] = array_diff($variables['theme_hook_suggestions'], array('block__no_wrapper'));
  //}
}
// */