You are here

function layout_builder_theme_registry_alter in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/layout_builder.module \layout_builder_theme_registry_alter()
  2. 9 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 362
Provides hook implementations for Layout Builder.

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';
    }
  }
}