You are here

function template_preprocess_getlocations_search_box in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_search/getlocations_search.module \template_preprocess_getlocations_search_box()

Parameters

array $variables:

Return value

Modifies $variables in situ

File

modules/getlocations_search/getlocations_search.module, line 959
getlocations_search.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function template_preprocess_getlocations_search_box(&$variables) {
  $getlocations_search_defaults = getlocations_search_defaults();
  $variables['box_width'] = $getlocations_search_defaults['width'];
  $variables['box_height'] = $getlocations_search_defaults['height'];
  if (module_exists('admin_menu')) {
    admin_menu_suppress();
  }

  // Construct page title
  if (drupal_get_title()) {
    $head_title = array(
      strip_tags(drupal_get_title()),
      variable_get('site_name', 'Drupal'),
    );
  }
  else {
    $head_title = array(
      variable_get('site_name', 'Drupal'),
    );
    if (variable_get('site_slogan', '')) {
      $head_title[] = variable_get('site_slogan', '');
    }
  }
  $variables['head_title'] = implode(' | ', $head_title);
  $variables['base_path'] = base_path();
  $variables['head'] = drupal_get_html_head();
  $variables['language'] = $GLOBALS['language'];
  $variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
  $variables['css'] = drupal_add_css();
  $variables['styles'] = drupal_get_css();
  $variables['scripts'] = drupal_get_js();
  $variables['title'] = drupal_get_title();

  // Closure should be filled last.
  $variables['closure'] = theme('closure');

  // Compile a list of classes that are going to be applied to the body element.
  // This allows advanced theming based on context (home page, node of certain type, etc.).
  $body_classes = array();

  // Add a class that tells us whether we're on the front page or not.
  $body_classes[] = $variables['is_front'] ? 'front' : 'not-front';

  // Add a class that tells us whether the page is viewed by an authenticated user or not.
  $body_classes[] = $variables['logged_in'] ? 'logged-in' : 'not-logged-in';
  $body_classes[] = 'no-sidebars';

  // Implode with spaces.
  $variables['body_classes'] = implode(' ', $body_classes);
}