You are here

function total_control_views_delete_page_display in Total Control Admin Dashboard 7.2

Same name and namespace in other branches
  1. 6.2 includes/total_control.inc \total_control_views_delete_page_display()

Removes view page displays.

Parameters

$type: The machine readable name of the content type

2 calls to total_control_views_delete_page_display()
total_control_admin_settings_submit in ./total_control.admin.inc
Submit function for settings page
total_control_remove_type_submit in includes/total_control.inc
Submit function for delete content type confirm form

File

includes/total_control.inc, line 49
Helper functions for total control.

Code

function total_control_views_delete_page_display($type) {
  $view = views_get_view('control_content');
  if (array_key_exists('page_tc_' . $type, $view->display)) {
    unset($view->display['page_tc_' . $type]);
    $view
      ->save();
    menu_cache_clear_all();
  }
  return;
}