You are here

function fieldset_helper_default_collapsible in Fieldset helper 7.2

Same name and namespace in other branches
  1. 6.2 fieldset_helper.module \fieldset_helper_default_collapsible()

Get default collapsible attribute for the current path.

1 call to fieldset_helper_default_collapsible()
_fieldset_helper_alter_fieldset in ./fieldset_helper.theme.inc
Alter fieldset element and set default collapsible and collapsed attributes.

File

./fieldset_helper.module, line 151

Code

function fieldset_helper_default_collapsible() {
  static $default_collapsible;
  if (isset($default_collapsible)) {
    return $default_collapsible;
  }
  $pages = variable_get('fieldset_helper_default_collapsible_pages', '*');
  if (empty($pages)) {
    $default_collapsible = FALSE;
  }
  elseif (trim($pages) == '*') {
    $default_collapsible = TRUE;
  }
  else {
    $default_collapsible = drupal_match_path($_GET['q'], $pages);
  }
  return $default_collapsible;
}