You are here

function fieldset_helper_default_collapsed in Fieldset helper 6.2

Same name and namespace in other branches
  1. 7.2 fieldset_helper.module \fieldset_helper_default_collapsed()

Get default collapsed state for the current page.

1 call to fieldset_helper_default_collapsed()
fieldset_helper_alter_theme_fieldset in ./fieldset_helper.theme.inc
Alters a fieldset element to set default attributes, state, and id.

File

./fieldset_helper.module, line 193

Code

function fieldset_helper_default_collapsed() {
  static $default_collapsed;
  if (isset($default_collapsed)) {
    return $default_collapsed;
  }
  $pages = variable_get('fieldset_helper_default_collapsed_pages', 'admin/build/modules');
  if (empty($pages)) {
    $default_collapsed = FALSE;
  }
  elseif (trim($pages) == '*') {
    $default_collapsed = TRUE;
  }
  else {
    $default_collapsed = drupal_match_path($_GET['q'], $pages);
  }
  return $default_collapsed;
}