function views_revert_allviews in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.2 views_revert.drush.inc \views_revert_allviews()
Reverts all views.
Parameters
array $views: All views in the system as provided by views_get_all_views().
1 call to views_revert_allviews()
- views_revert_views in drush/
views.drush.inc - Callback function for views-revert command.
File
- drush/
views.drush.inc, line 213 - Drush integration for Views.
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;
}