Skip to content

Instantly share code, notes, and snippets.

@angry-dan
Created July 17, 2014 15:47
Show Gist options
  • Save angry-dan/508252e202e2e8d4540a to your computer and use it in GitHub Desktop.
Save angry-dan/508252e202e2e8d4540a to your computer and use it in GitHub Desktop.
Add to an install/update hook to turn off a view.
<?php
$view = views_get_view('VIEW_NAME');
if (!empty($view)) {
ctools_include('export');
ctools_export_crud_set_status('views_view', $view, TRUE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment