function spaces_calendar_views_default_views in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_calendar/spaces_calendar.module \spaces_calendar_views_default_views()
Implementation of hook_default_views
File
- spaces_calendar/
spaces_calendar.module, line 198
Code
function spaces_calendar_views_default_views() {
$default_views = array();
if (variable_get('spaces_calendar_datefield', '') && variable_get('spaces_calendar_nodetype', '')) {
$default_views[] = '_spaces_calendar_views_calendar';
$default_views[] = '_spaces_calendar_views_calendar_upcoming';
}
if (_spaces_calendar_ical_enabled()) {
$default_views[] = '_spaces_calendar_views_calendar_feeds';
$default_views[] = '_spaces_calendar_views_calendar_ical_items';
}
foreach ($default_views as $v) {
$view = call_user_func($v);
if (is_object($view) && $view->name) {
$views[$view->name] = $view;
}
}
return $views;
}