diff options
Diffstat (limited to 'core/modules/node/node.module')
-rw-r--r-- | core/modules/node/node.module | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/core/modules/node/node.module b/core/modules/node/node.module index e2b0fcccb2e..4ee3c48a00b 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -257,30 +257,6 @@ function node_preprocess_block(&$variables): void { } /** - * Implements hook_preprocess_HOOK() for node field templates. - */ -function node_preprocess_field__node(&$variables): void { - // Set a variable 'is_inline' in cases where inline markup is required, - // without any block elements such as <div>. - - if ($variables['element']['#is_page_title'] ?? FALSE) { - // Page title is always inline because it will be displayed inside <h1>. - $variables['is_inline'] = TRUE; - } - elseif (in_array($variables['field_name'], ['created', 'uid', 'title'], TRUE)) { - // Display created, uid and title fields inline because they will be - // displayed inline by node.html.twig. Skip this if the field - // display is configurable and skipping has been enabled. - // @todo Delete as part of https://www.drupal.org/node/3015623 - - /** @var \Drupal\node\NodeInterface $node */ - $node = $variables['element']['#object']; - $skip_custom_preprocessing = $node->getEntityType()->get('enable_base_field_custom_preprocess_skipping'); - $variables['is_inline'] = !$skip_custom_preprocessing || !$node->getFieldDefinition($variables['field_name'])->isDisplayConfigurable('view'); - } -} - -/** * Implements hook_theme_suggestions_HOOK(). */ function node_theme_suggestions_node(array $variables): array { |