You are here

function widgets_element_load_by_admin_path in Widgets 7

1 call to widgets_element_load_by_admin_path()
widgets_template_auto_form in ./widgets.admin.inc
Form structure for the template auto form.

File

./widgets.module, line 943
Exposes global functionality for creating widget sets.

Code

function widgets_element_load_by_admin_path() {
  $element = FALSE;
  if (arg(6) == 'add') {
    $element = widgets_element_definition_load(arg(7));
  }
  elseif (arg(4) == 'preview') {
    $element = widgets_element_definition_load(arg(5));
  }
  else {
    $element = widgets_element_load(arg(7), arg(5));
  }
  return $element;
}