function layout_builder_theme_registry_alter

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/layout_builder.module \layout_builder_theme_registry_alter()
  2. 8.9.x core/modules/layout_builder/layout_builder.module \layout_builder_theme_registry_alter()
  3. 10 core/modules/layout_builder/layout_builder.module \layout_builder_theme_registry_alter()

Implements hook_theme_registry_alter().

File

core/modules/layout_builder/layout_builder.module, line 369

Code

function layout_builder_theme_registry_alter(&$theme_registry) {
    // Move our preprocess to run after
    // content_translation_preprocess_language_content_settings_table().
    if (!empty($theme_registry['language_content_settings_table']['preprocess functions'])) {
        $preprocess_functions =& $theme_registry['language_content_settings_table']['preprocess functions'];
        $index = array_search('layout_builder_preprocess_language_content_settings_table', $preprocess_functions);
        if ($index !== FALSE) {
            unset($preprocess_functions[$index]);
            $preprocess_functions[] = 'layout_builder_preprocess_language_content_settings_table';
        }
    }
}

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