You are here

function jquery_ui_filter_init in jQuery UI filter 6

Same name and namespace in other branches
  1. 7 jquery_ui_filter.module \jquery_ui_filter_init()

Implementation of hook_init().

File

./jquery_ui_filter.module, line 10
Converts static HTML to a jQuery UI accordian or tabs widget.

Code

function jquery_ui_filter_init() {

  // Add css
  if ($jquery_ui_css = variable_get('jquery_ui_filter_css', jquery_ui_get_path() . '/themes/base/jquery-ui.css')) {
    drupal_add_css($jquery_ui_css);
  }

  // Add script and settings.
  drupal_add_js(drupal_get_path('module', 'jquery_ui_filter') . '/jquery_ui_filter.js');
  $settings = array(
    'jQueryUiFilter' => array(
      'disabled' => drupal_match_path($_GET['q'], variable_get('jquery_ui_filter_disabled_pages', 'print*')) ? 1 : 0,
    ),
  );
  drupal_add_js($settings, 'setting');
}