diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc index 9a78e3365..ddda66a3d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -87,6 +87,31 @@ function drupal_get_breadcrumb() { /* @} */ /** + * @name Page tabs + * @ingroup common + * + * Functions to get and set the tabs of the current page. + * @{ + */ + +/** + * @param $tab Array of links to use for tabs + */ +function drupal_set_tab($tab = NULL) { + static $stored_tab = array(); + + if (!is_null($tab)) { + $stored_tab[] = $tab; + } + return $stored_tab; +} + +function drupal_get_tab() { + return drupal_set_tab(); +} +/* @} */ + +/** * @name HTML head contents * @ingroup common * @@ -995,7 +1020,7 @@ function form_radios($title, $name, $value, $options, $description = NULL, $requ foreach ($options as $key => $choice) { $choices .= "<label class=\"option\"><input type=\"radio\" class=\"form-radio\" name=\"edit[$name]\" value=\"$key\"". ($key == $value ? " checked=\"checked\"" : "") ." /> $choice</label><br />"; } - return theme('form_element', $title, $choices, $description, $required = FALSE); + return theme('form_element', $title, $choices, $description, $required); } } |