You are here

function views_skinr_theme_hooks in Skinr 8.2

Same name and namespace in other branches
  1. 7.2 modules/views.skinr.inc \views_skinr_theme_hooks()

Implements hook_skinr_theme_hooks().

File

modules/views.skinr.inc, line 56
Implements Skinr hooks for views.module.

Code

function views_skinr_theme_hooks($element_type, $element) {
  $theme_hooks = array();
  if ($element_type == 'view') {
    list($name, $display_id) = explode('__', $element, 2);
    if ($view = Views::getView($name)) {
      $view
        ->executeDisplay($display_id);

      // Create list of suggested templates.
      $theme_hooks = $view
        ->buildThemeFunctions('views_view');

      // @todo Determine whether below code is still relevant.

      /*
      // Fetch additional style based suggested templates.
      $additional_hooks = views_theme_functions($display->display_plugin, $view, $display);
      $theme_hooks = array_merge($additional_hooks, $theme_hooks);
      */
    }
    else {
      $theme_hooks[] = 'views_view';
    }
  }
  return $theme_hooks;
}