0 && file_exists($file_path)) { require_once($file_path); } } } _zurb_foundation_load($files); /** * Implements hook_html_head_alter(). */ function zurb_foundation_html_head_alter(&$head_elements) { // HTML5 charset declaration. $head_elements['system_meta_content_type']['#attributes'] = array( 'charset' => 'utf-8', ); // Optimize mobile viewport. $head_elements['mobile_viewport'] = array( '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array( 'name' => 'viewport', 'content' => 'width=device-width', ), ); // Remove image toolbar in IE. $head_elements['ie_image_toolbar'] = array( '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array( 'http-equiv' => 'ImageToolbar', 'content' => 'false', ), ); } /** * Implements theme_breadrumb(). * * Print breadcrumbs as a list, with separators. */ function zurb_foundation_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; if (!empty($breadcrumb)) { // Provide a navigational heading to give context for breadcrumb links to // screen-reader users. Make the heading invisible with .element-invisible. $breadcrumbs = '

' . t('You are here') . '

'; $breadcrumbs .= ''; return $breadcrumbs; } } function zurb_foundation_field($variables) { $output = ''; // Render the label, if it's not hidden. if (!$variables['label_hidden']) { $output .= '
' . $variables['label'] . ': 
'; } // Edit module requires some extra wrappers to work. if (module_exists('edit')) { $output .= '
'; foreach ($variables['items'] as $delta => $item) { $classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even'); $output .= '
' . drupal_render($item) . '
'; } $output .= '
'; } else { foreach ($variables['items'] as $item) { $output .= drupal_render($item); } } // Render the top-level DIV. $output = '
' . $output . '
'; return $output; } /** * Implements theme_field__field_type(). */ function zurb_foundation_field__taxonomy_term_reference($variables) { $output = ''; // Render the label, if it's not hidden. if (!$variables['label_hidden']) { $output .= '

' . $variables['label'] . ':

'; } // Render the items. $output .= ($variables['element']['#label_display'] == 'inline') ? ''; } /** * Implements theme_links() targeting the secondary menu specifically. * Formats links for Top Bar http://foundation.zurb.com/docs/components/top-bar.html */ function zurb_foundation_links__topbar_secondary_menu($variables) { // We need to fetch the links ourselves because we need the entire tree. $links = menu_tree_output(menu_tree_all_data(variable_get('menu_secondary_links_source', 'user-menu'))); $output = _zurb_foundation_links($links); $variables['attributes']['class'][] = 'right'; return '' . $output . ''; } /** * Helper function to output a Drupal menu as a Foundation Top Bar. * * @param array * An array of menu links. * * @return string * A rendered list of links, with no