You are here

function fieldset_helper_fieldset_helper_path_alter in Fieldset helper 7.2

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

Implements hook_fieldset_helper_path_alter().

File

./fieldset_helper.module, line 96

Code

function fieldset_helper_fieldset_helper_path_alter(&$path) {

  // Force all node form (add and edit) fieldsets to share their state.
  if (variable_get('fieldset_helper_node_form_state', 1) == 1) {
    if (preg_match('#^(node/[^/]+/edit|node/add/[^/]+)$#', $path)) {
      $path = 'node/form';
    }
  }
}