Skip to content

Instantly share code, notes, and snippets.

@cfitz
Created June 21, 2012 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfitz/2964757 to your computer and use it in GitHub Desktop.
Save cfitz/2964757 to your computer and use it in GitHub Desktop.
<?php
function _footer_menu_build_tree() {
$tree = menu_build_tree('main-menu', array('max_depth'=>2));
$tree = array_slice($tree, 0, 9);
$tree = menu_tree_output($tree);
return $tree;
}
function wmu_base_preprocess(&$vars, $hook) {
// Setup the social links
$social_links = array();
if (module_exists('openacademy_news')) {
$social_links[] = l('RSS', 'rss.xml', array('attributes' => array('class' => 'rss-link')));
}
if ($twitter_link = theme_get_setting('twitter_link')) {
$social_links[] = l('Twitter', $twitter_link, array('attributes' => array('class' => 'twitter-link')));
}
if ($youtube_link = theme_get_setting('youtube_link')) {
$social_links[] = l('YouTube', $youtube_link, array('attributes' => array('class' => 'youtube-link')));
}
if ($facebook_link = theme_get_setting('facebook_link')) {
$social_links[] = l('Facebook', $facebook_link, array('attributes' => array('class' => 'facebook-link')));
}
$vars['social_links'] = theme('item_list', array('items' => $social_links));
}
function wmu_base_html_head_alter(&$head_elements) {
// Force the latest IE rendering engine and Google Chrome Frame.
$head_elements['chrome_frame'] = array(
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array('http-equiv' => 'X-UA-Compatible', 'content' => 'IE=edge,chrome=1'),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment