1 views_ui.admin.inc views_ui_config_item_form_rescan($form, &$form_state)

Submit hook to clear Backdrop's theme registry (thereby triggering a templates rescan).

File

core/modules/views_ui/views_ui.admin.inc, line 4654
Provides the Views' administrative interface.

Code

function views_ui_config_item_form_rescan($form, &$form_state) {
  backdrop_theme_rebuild();

  // The 'Theme: Information' page is about to be shown again. That page
  // analyzes the output of theme_get_registry(). However, this latter
  // function uses an internal cache (which was initialized before we
  // called backdrop_theme_rebuild()) so it won't reflect the
  // current state of our theme registry. The only way to clear that cache
  // is to re-initialize the theme system:
  unset($GLOBALS['theme']);
  backdrop_theme_initialize();

  $form_state['rerender'] = TRUE;
  $form_state['rebuild'] = TRUE;
}