You are here

function widgets_get_context_path in Widgets 7

1 call to widgets_get_context_path()
widgets_build_cache_cid in ./widgets.module

File

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

Code

function widgets_get_context_path($context = array()) {
  $path = $_GET['q'];
  if (isset($context['node']->nid)) {
    $path .= 'node/' . $context['node']->nid;
  }
  elseif (arg(0) == 'node' && is_numeric(arg(1))) {
    $path .= 'node/' . arg(1);
  }
  drupal_alter('widgets_context_path', $path, $context);
  return $path;
}