function views_revert_allviews

3.x views.drush.inc views_revert_allviews($views)
2.x views_revert.drush.inc views_revert_allviews($views)

Reverts all views

Parameters

$views: All views in the system as provided by views_get_all_views().

1 call to views_revert_allviews()
views_revert_views in ./views_revert.drush.inc
Callback function for views-revert command.

File

./views_revert.drush.inc, line 116
views-revert - Drush command to revert views overridden in the system.

Code

function views_revert_allviews($views) {
  $i = 0;
  foreach ($views as $view) {
    if ($view->disabled) {
      continue;
    }

    if ($view->type == t('Overridden')) {
      views_revert_view($view);
      $i++;
    }
  }
  return $i;
}