summaryrefslogtreecommitdiffstats
path: root/zen
diff options
context:
space:
mode:
authorJohnAlbin2008-09-11 10:10:26 +0000
committerJohnAlbin2008-09-11 10:10:26 +0000
commit4f5c1d0c13064577be565d584cbe46ce59e6cd69 (patch)
tree3956b6af03594e8da12bc7d953b439fcbec71320 /zen
parent572afc964fadd0fe53d736585edf728d45bc1def (diff)
Folded template-menus.php back into template.php since its not conditionally included.
Diffstat (limited to 'zen')
-rw-r--r--zen/template-menus.php35
-rw-r--r--zen/template.php54
2 files changed, 38 insertions, 51 deletions
diff --git a/zen/template-menus.php b/zen/template-menus.php
deleted file mode 100644
index a021834..0000000
--- a/zen/template-menus.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-// $Id$
-
-/**
- * Implements theme_menu_item_link()
- */
-function zen_menu_item_link($link) {
- if (empty($link['localized_options'])) {
- $link['localized_options'] = array();
- }
-
- // If an item is a LOCAL TASK, render it as a tab
- if ($link['type'] & MENU_IS_LOCAL_TASK) {
- $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
- $link['localized_options']['html'] = TRUE;
- }
-
- return l($link['title'], $link['href'], $link['localized_options']);
-}
-
-/**
- * Duplicate of theme_menu_local_tasks() but adds clear-block to tabs.
- */
-function zen_menu_local_tasks() {
- $output = '';
-
- if ($primary = menu_primary_local_tasks()) {
- $output .= '<ul class="tabs primary clear-block">' . $primary . '</ul>';
- }
- if ($secondary = menu_secondary_local_tasks()) {
- $output .= '<ul class="tabs secondary clear-block">' . $secondary . '</ul>';
- }
-
- return $output;
-}
diff --git a/zen/template.php b/zen/template.php
index 7172143..4bd40ec 100644
--- a/zen/template.php
+++ b/zen/template.php
@@ -23,15 +23,12 @@
*/
-/*
- * To make this file easier to read, we split up the code into managable parts.
- * Theme developers are likely to only be interested in functions that are in
- * this main template.php file.
+/**
+ * Implements HOOK_theme().
*/
-
-// Tabs and menu functions
-include_once 'template-menus.php';
-
+function zen_theme(&$existing, $type, $theme, $path) {
+ return _zen_theme($existing, $type, $theme, $path);
+}
/**
* Return a themed breadcrumb trail.
@@ -62,6 +59,38 @@ function zen_breadcrumb($breadcrumb) {
return '';
}
+/**
+ * Implements theme_menu_item_link()
+ */
+function zen_menu_item_link($link) {
+ if (empty($link['localized_options'])) {
+ $link['localized_options'] = array();
+ }
+
+ // If an item is a LOCAL TASK, render it as a tab
+ if ($link['type'] & MENU_IS_LOCAL_TASK) {
+ $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
+ $link['localized_options']['html'] = TRUE;
+ }
+
+ return l($link['title'], $link['href'], $link['localized_options']);
+}
+
+/**
+ * Duplicate of theme_menu_local_tasks() but adds clear-block to tabs.
+ */
+function zen_menu_local_tasks() {
+ $output = '';
+
+ if ($primary = menu_primary_local_tasks()) {
+ $output .= '<ul class="tabs primary clear-block">' . $primary . '</ul>';
+ }
+ if ($secondary = menu_secondary_local_tasks()) {
+ $output .= '<ul class="tabs secondary clear-block">' . $secondary . '</ul>';
+ }
+
+ return $output;
+}
/*
* CREATE OR MODIFY VARIABLES FOR YOUR THEME
@@ -332,7 +361,7 @@ function zen_preprocess_block(&$vars, $hook) {
* http://www.w3.org/TR/html4/struct/global.html#h-7.5.2 specifies what makes a
* valid ID attribute in HTML. This function:
*
- * - Ensure an ID starts with an alpha character by optionally adding an 'n'.
+ * - Ensure an ID starts with an alpha character by optionally adding an 'id'.
* - Replaces any character except A-Z, numbers, and underscores with dashes.
* - Converts entire string to lowercase.
*
@@ -361,10 +390,3 @@ function path_to_zentheme() {
}
return $theme_path;
}
-
-/**
- * Implements HOOK_theme().
- */
-function zen_theme(&$existing, $type, $theme, $path) {
- return _zen_theme($existing, $type, $theme, $path);
-}