function views_get_all_templates

3.x views.module views_get_all_templates()

Get all view templates.

Templates are special in-code views that are never active, but exist only to be cloned into real views as though they were templates.

3 calls to views_get_all_templates()

File

./views.module, line 1339
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_get_all_templates() {
  $templates = array();
  $modules = views_module_include('views_template');

  foreach ($modules as $module => $info) {
    $function = $module . '_views_templates';
    if (function_exists($function)) {
      $new = $function();
      if ($new && is_array($new)) {
        $templates = array_merge($new, $templates);
      }
    }
  }

  return $templates;
}