diff --git a/quant.module b/quant.module index 150bc31..c535fa5 100644 --- a/quant.module +++ b/quant.module @@ -501,3 +501,16 @@ function quant_preprocess_views_view_table(&$variables) { } } } + +/** + * Implements hook_preprocess_views_view(). + */ +function quant_preprocess_views_view(array &$variables) { + /** @var \Drupal\views\ViewExecutable $view */ + $view = $variables['view']; + + // If the view has exposed filters, add a warning for admins. + if ($view->exposed_data && \Drupal::currentUser()->hasRole('administrator')) { + \Drupal::messenger()->addWarning(t('The view (@view_id) on this page has exposed filters which need special handling for a static website.
See the documentation for your options.', ['@view_id' => $view->id()])); + } +}