You are here

function widgets_page_alter in Widgets 7

Implements hook_page_alter() to insert JavaScript from element templates.

File

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

Code

function widgets_page_alter(&$page) {
  $adds = widgets_add_js_singleton();
  if (is_array($adds)) {
    foreach ($adds as $data => $add) {
      drupal_add_js($add['data'], $add['options']);
    }
  }
}