You are here

function themename_preprocess in Service links 7.2

Same name and namespace in other branches
  1. 6.2 template.php \themename_preprocess()
  2. 6 template.php \themename_preprocess()

If something doesn't work well try this.

File

./template.php, line 49
Various examples to overwrite the theme settings.

Code

function themename_preprocess(&$vars, $hook) {
  switch ($hook) {
    case 'node':
      if (module_exists('service_links')) {
        if (user_access('access service links') && service_links_show($vars['node'])) {
          $vars['twitter'] = theme('links', array(
            'links' => service_links_render_some('twitter', $vars['node']),
          ));
        }
      }
      break;
    case 'page':
      if (module_exists('service_links')) {
        if (user_access('access service links') && service_links_show($vars['node'])) {
          $vars['service_links'] = theme('links', array(
            'links' => service_links_render($vars['node']),
          ));
        }
      }
      break;
  }
}