You are here

function qtip_views_fetch_element_tooltips in qTip (Stylish jQuery Tooltips) 7.2

Helper function to get element tooltips.

2 calls to qtip_views_fetch_element_tooltips()
qtip_views_preprocess_views_view in modules/qtip_views/qtip_views.module
Implements hook_preprocess_views_view().
qtip_views_views_pre_render in modules/qtip_views/qtip_views.module
Implements hook_views_pre_render().

File

modules/qtip_views/qtip_views.module, line 290

Code

function qtip_views_fetch_element_tooltips($view) {
  $tooltips = array();
  if (isset($view->display_handler->display->display_options['fields'])) {

    // Fields are overridden: use this display's tooltips.
    $elements = @$view->display_handler->display->display_options['fields'];
  }
  else {

    // Fields are default: use default display's tooltips.
    $elements = @$view->display['default']->display_options['fields'];
  }
  foreach ($elements as $id => $element) {
    if (isset($element['element_qtip']) && $element['element_qtip']) {
      $tooltips[$id] = array(
        'title' => $element['qtip_title'],
        'text' => $element['qtip_text'],
        'instance' => $element['qtip_instance'],
      );
    }
  }
  return $tooltips;
}