You are here

function views_theme_wizard_page in Views (for Drupal 7) 5

1 string reference to 'views_theme_wizard_page'
views_theme_wizard_menu in ./views_theme_wizard.module

File

./views_theme_wizard.module, line 16

Code

function views_theme_wizard_page() {
  views_load_cache();
  $result = db_query("SELECT name, description FROM {view_view}");
  $views = array();
  while ($view = db_fetch_object($result)) {
    $views[$view->name] = $view->name . ': ' . $view->description;
  }
  $default_views = _views_get_default_views();
  $views_status = variable_get('views_defaults', array());
  foreach ($default_views as $view) {
    if (!$views[$view->name] && ($views_status[$view->name] == 'enabled' || !$views_status[$view->name] && !$view->disabled)) {
      $views[$view->name] = check_plain($view->name . ': ' . $view->description);
    }
  }
  return drupal_get_form('views_theme_wizard_form', $views);
}