function drupal_theme_rebuild

Forces the system to rebuild the theme registry.

This function should be called when modules are added to the system, or when a dynamic system needs to add more theme hooks.

8 calls to drupal_theme_rebuild()
DisplayPluginBase::rescanThemes in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Submit hook to clear Drupal's theme registry (thereby triggering a templates rescan).
image_style_flush in drupal/core/modules/image/image.module
Flushes cached media for a style.
ModuleHandler::disable in drupal/core/lib/Drupal/Core/Extension/ModuleHandler.php
Disables a given set of modules.
ModuleHandler::enable in drupal/core/lib/Drupal/Core/Extension/ModuleHandler.php
Enables or installs a given list of modules.
ThemeTest::testPreprocessForSuggestions in drupal/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
Ensures preprocess functions run even for suggestion implementations.

... See full list

File

drupal/core/includes/theme.inc, line 396
The theme system, which controls the output of Drupal.

Code

function drupal_theme_rebuild() {
  drupal_static_reset('theme_get_registry');
  cache()
    ->invalidateTags(array(
    'theme_registry' => TRUE,
  ));
}