function 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()
views_ui::add_template_page in plugins/export_ui/views_ui.class.php
views_ui_add_template_page in includes/admin.inc
views_ui_menu in ./views_ui.module
Implements hook_menu().

File

./views.module, line 1513

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;
}