You are here

function jquery_ui_filter_preprocess_html in jQuery UI filter 7

Implements hook_preprocess_html().

File

dialog/jquery_ui_filter_dialog.module, line 384
Opens links inside a jQuery UI dialog widget.

Code

function jquery_ui_filter_preprocess_html(&$variables) {
  if (jquery_ui_filter_dialog_enabled()) {
    global $theme;
    $features = jquery_ui_filter_dialog_get_features();

    // Add dialog classes
    $variables['classes_array'][] = $theme;
    $variables['classes_array'][] = 'jquery-ui-filter-dialog';
    if (empty($features['page-regions'])) {
      $variables['classes_array'][] = 'jquery-ui-filter-dialog-no-regions';
    }

    // Remove sidebar classes
    if (empty($features['page-regions'])) {
      foreach ($variables['classes_array'] as $key => $value) {
        if (strpos($value, 'sidebar') !== FALSE) {
          unset($variables['classes_array'][$key]);
        }
      }
    }
    $variables['classes_array'] = array_values($variables['classes_array']);
  }
}