function views_ui_show_default_display

Controls whether or not the default display should have its own tab on edit.

1 call to views_ui_show_default_display()
views_ui_edit_page_display_tabs in includes/admin.inc
Adds tabs for navigating across Displays when editing a View.

File

includes/admin.inc, line 1570

Code

function views_ui_show_default_display($view) {
    // Always show the default display for advanced users who prefer that mode.
    $advanced_mode = variable_get('views_ui_show_master_display', FALSE);
    // For other users, show the default display only if there are no others, and
    // hide it if there's at least one "real" display.
    $additional_displays = count($view->display) == 1;
    return $advanced_mode || $additional_displays;
}