diff --git a/includes/block.inc b/includes/block.inc deleted file mode 100644 index 147c30ca77dadd4ba76f754cf28bec39197d0cb5..0000000000000000000000000000000000000000 --- a/includes/block.inc +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/** - * @file - * Provides the necessary hooks for the block theme suggestions. - */ - -use Drupal\block_content\BlockContentInterface; - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function gesso_theme_suggestions_block_alter(array &$suggestions, array $variables) { - $content = $variables['elements']['content']; - if (isset($content['#block_content']) and $content['#block_content'] instanceof BlockContentInterface) { - $suggestions = []; - $bundle = $content['#block_content']->bundle(); - $view_mode = $content['#view_mode']; - $suggestions[] = 'block__' . $bundle; - $suggestions[] = 'block__' . $view_mode; - $suggestions[] = 'block__' . $bundle . '__' . $view_mode; - if (!empty($variables['elements']['#id'])) { - $suggestions[] = 'block__' . $variables['elements']['#id']; - } - } -}