function drupal_theme_rebuild

Same name in other branches
  1. 9 core/includes/theme.inc \drupal_theme_rebuild()
  2. 8.9.x core/includes/theme.inc \drupal_theme_rebuild()
  3. 10 core/includes/theme.inc \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()
drupal_flush_all_caches in includes/common.inc
Flushes all cached data on the site.
image_style_flush in modules/image/image.module
Flushes cached media for a style.
module_disable in includes/module.inc
Disables a given set of modules.
module_enable in includes/module.inc
Enables or installs a given list of modules.
ThemeTestCase::testPreprocessForSuggestions in modules/simpletest/tests/theme.test
Ensures preprocess functions run even for suggestion implementations.

... See full list

File

includes/theme.inc, line 352

Code

function drupal_theme_rebuild() {
    drupal_static_reset('theme_get_registry');
    cache_clear_all('theme_registry', 'cache', TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.