You are here

function fieldset_helper_default_collapsed in Fieldset helper 7.2

Same name and namespace in other branches
  1. 6.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_fieldset in ./fieldset_helper.theme.inc
Alter fieldset element and set default collapsible and collapsed attributes.

File

./fieldset_helper.module, line 175

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/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;
}